diff options
author | Cristian Cadar <c.cadar@imperial.ac.uk> | 2017-07-25 09:49:56 +0100 |
---|---|---|
committer | Cristian Cadar <c.cadar@imperial.ac.uk> | 2017-07-25 09:49:56 +0100 |
commit | 5a8422683380a76bc2b00cc23237d51b7704e2fa (patch) | |
tree | 908aace6f94d92a267472ee006615743ed7ae3d1 | |
parent | 13b17ee65b7db6af26aa614b7f0318fe2a60fe36 (diff) | |
download | klee-5a8422683380a76bc2b00cc23237d51b7704e2fa.tar.gz |
Added the const qualifier to the keys in the constantMap
-rw-r--r-- | include/klee/Internal/Module/KModule.h | 4 | ||||
-rw-r--r-- | lib/Module/KModule.cpp | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/include/klee/Internal/Module/KModule.h b/include/klee/Internal/Module/KModule.h index f0f20394..41253383 100644 --- a/include/klee/Internal/Module/KModule.h +++ b/include/klee/Internal/Module/KModule.h @@ -97,8 +97,8 @@ namespace klee { InstructionInfoTable *infos; std::vector<llvm::Constant*> constants; - std::map<llvm::Constant*, KConstant*> constantMap; - KConstant* getKConstant(llvm::Constant *c); + std::map<const llvm::Constant*, KConstant*> constantMap; + KConstant* getKConstant(const llvm::Constant *c); Cell *constantTable; diff --git a/lib/Module/KModule.cpp b/lib/Module/KModule.cpp index 19408d65..751776b9 100644 --- a/lib/Module/KModule.cpp +++ b/lib/Module/KModule.cpp @@ -104,7 +104,7 @@ KModule::~KModule() { ie = functions.end(); it != ie; ++it) delete *it; - for (std::map<llvm::Constant*, KConstant*>::iterator it=constantMap.begin(), + for (std::map<const llvm::Constant*, KConstant*>::iterator it=constantMap.begin(), itE=constantMap.end(); it!=itE;++it) delete it->second; @@ -415,8 +415,8 @@ void KModule::prepare(const Interpreter::ModuleOptions &opts, } } -KConstant* KModule::getKConstant(Constant *c) { - std::map<llvm::Constant*, KConstant*>::iterator it = constantMap.find(c); +KConstant* KModule::getKConstant(const Constant *c) { + std::map<const llvm::Constant*, KConstant*>::iterator it = constantMap.find(c); if (it != constantMap.end()) return it->second; return NULL; |