Skip to content
Browse files

[Attributor][Fix] Add const qualifier

I forgot to add this as part of the last commit.

llvm-svn: 367964
  • Loading branch information
jdoerfert committed Aug 6, 2019
1 parent 78f05d3 commit af61516352a7fbd1f7bb3e404f19437bf40492c7
Showing with 4 additions and 4 deletions.
  1. +4 −4 llvm/include/llvm/Transforms/IPO/Attributor.h
@@ -333,24 +333,24 @@ struct InformationCache {

/// Return the map that relates "interesting" opcodes with all instructions
/// with that opcode in \p F.
OpcodeInstMapTy &getOpcodeInstMapForFunction(Function &F) {
OpcodeInstMapTy &getOpcodeInstMapForFunction(const Function &F) {
return FuncInstOpcodeMap[&F];

/// A vector type to hold instructions.
using InstructionVectorTy = std::vector<Instruction *>;

/// Return the instructions in \p F that may read or write memory.
InstructionVectorTy &getReadOrWriteInstsForFunction(Function &F) {
InstructionVectorTy &getReadOrWriteInstsForFunction(const Function &F) {
return FuncRWInstsMap[&F];

/// A map type from functions to opcode to instruction maps.
using FuncInstOpcodeMapTy = DenseMap<Function *, OpcodeInstMapTy>;
using FuncInstOpcodeMapTy = DenseMap<const Function *, OpcodeInstMapTy>;

/// A map type from functions to their read or write instructions.
using FuncRWInstsMapTy = DenseMap<Function *, InstructionVectorTy>;
using FuncRWInstsMapTy = DenseMap<const Function *, InstructionVectorTy>;

/// A nested map that remembers all instructions in a function with a certain
/// instruction opcode (Instruction::getOpcode()).

0 comments on commit af61516

Please sign in to comment.
You can’t perform that action at this time.