aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/Module
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Module')
-rw-r--r--lib/Module/KModule.cpp4
-rw-r--r--lib/Module/Passes.h2
2 files changed, 5 insertions, 1 deletions
diff --git a/lib/Module/KModule.cpp b/lib/Module/KModule.cpp
index ff13efda..7b23a9c9 100644
--- a/lib/Module/KModule.cpp
+++ b/lib/Module/KModule.cpp
@@ -127,6 +127,10 @@ KModule::~KModule() {
ie = functions.end(); it != ie; ++it)
delete *it;
+ for (std::map<llvm::Constant*, KConstant*>::iterator it=constantMap.begin(),
+ itE=constantMap.end(); it!=itE;++it)
+ delete it->second;
+
delete targetData;
delete module;
}
diff --git a/lib/Module/Passes.h b/lib/Module/Passes.h
index 0c294daa..c6e09f0f 100644
--- a/lib/Module/Passes.h
+++ b/lib/Module/Passes.h
@@ -64,7 +64,7 @@ public:
#if LLVM_VERSION_CODE < LLVM_VERSION(2, 8)
RaiseAsmPass() : llvm::ModulePass((intptr_t) &ID) {}
#else
- RaiseAsmPass() : llvm::ModulePass(ID) {}
+ RaiseAsmPass() : llvm::ModulePass(ID), TLI(0) {}
#endif
virtual bool runOnModule(llvm::Module &M);