[llvm] r367964 - [Attributor][Fix] Add const qualifier
Johannes Doerfert via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 5 17:46:02 PDT 2019
Author: jdoerfert
Date: Mon Aug 5 17:46:02 2019
New Revision: 367964
URL: http://llvm.org/viewvc/llvm-project?rev=367964&view=rev
Log:
[Attributor][Fix] Add const qualifier
I forgot to add this as part of the last commit.
Modified:
llvm/trunk/include/llvm/Transforms/IPO/Attributor.h
Modified: llvm/trunk/include/llvm/Transforms/IPO/Attributor.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Transforms/IPO/Attributor.h?rev=367964&r1=367963&r2=367964&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Transforms/IPO/Attributor.h (original)
+++ llvm/trunk/include/llvm/Transforms/IPO/Attributor.h Mon Aug 5 17:46:02 2019
@@ -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<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];
}
private:
/// 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()).
More information about the llvm-commits
mailing list