From af61516352a7fbd1f7bb3e404f19437bf40492c7 Mon Sep 17 00:00:00 2001 From: Johannes Doerfert Date: Tue, 6 Aug 2019 00:46:02 +0000 Subject: [PATCH] [Attributor][Fix] Add const qualifier I forgot to add this as part of the last commit. llvm-svn: 367964 --- llvm/include/llvm/Transforms/IPO/Attributor.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/llvm/include/llvm/Transforms/IPO/Attributor.h b/llvm/include/llvm/Transforms/IPO/Attributor.h index 1b6b711d2b92..52c9507a8bbd 100644 --- a/llvm/include/llvm/Transforms/IPO/Attributor.h +++ b/llvm/include/llvm/Transforms/IPO/Attributor.h @@ -333,7 +333,7 @@ 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]; } @@ -341,16 +341,16 @@ struct InformationCache { using InstructionVectorTy = std::vector; /// Return the instructions in \p F that may read or write memory. - InstructionVectorTy &getReadOrWriteInstsForFunction(Function &F) { + InstructionVectorTy &getReadOrWriteInstsForFunction(const Function &F) { return FuncRWInstsMap[&F]; } private: /// A map type from functions to opcode to instruction maps. - using FuncInstOpcodeMapTy = DenseMap; + using FuncInstOpcodeMapTy = DenseMap; /// A map type from functions to their read or write instructions. - using FuncRWInstsMapTy = DenseMap; + using FuncRWInstsMapTy = DenseMap; /// A nested map that remembers all instructions in a function with a certain /// instruction opcode (Instruction::getOpcode()).