about summary refs log tree commit diff homepage
path: root/lib/Module
diff options
context:
space:
mode:
authorCristian Cadar <c.cadar@imperial.ac.uk>2017-07-25 09:49:56 +0100
committerCristian Cadar <c.cadar@imperial.ac.uk>2017-07-25 09:49:56 +0100
commit5a8422683380a76bc2b00cc23237d51b7704e2fa (patch)
tree908aace6f94d92a267472ee006615743ed7ae3d1 /lib/Module
parent13b17ee65b7db6af26aa614b7f0318fe2a60fe36 (diff)
downloadklee-5a8422683380a76bc2b00cc23237d51b7704e2fa.tar.gz
Added the const qualifier to the keys in the constantMap
Diffstat (limited to 'lib/Module')
-rw-r--r--lib/Module/KModule.cpp6
1 files changed, 3 insertions, 3 deletions
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;