about summary refs log tree commit diff homepage
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/klee/main.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/klee/main.cpp b/tools/klee/main.cpp
index 58e7eecc..af8b829d 100644
--- a/tools/klee/main.cpp
+++ b/tools/klee/main.cpp
@@ -603,8 +603,10 @@ static int initEnv(Module *mainModule) {
   Value* oldArgc = mainFn->arg_begin();
   Value* oldArgv = ++mainFn->arg_begin();
   
-  AllocaInst* argcPtr = new AllocaInst(oldArgc->getType(), "argcPtr", firstInst);
-  AllocaInst* argvPtr = new AllocaInst(oldArgv->getType(), "argvPtr", firstInst);
+  AllocaInst* argcPtr = new AllocaInst(getGlobalContext(), oldArgc->getType(), 
+                                       "argcPtr", firstInst);
+  AllocaInst* argvPtr = new AllocaInst(getGlobalContext(), oldArgv->getType(), 
+                                       "argvPtr", firstInst);
 
   /* Insert void klee_init_env(int* argc, char*** argv) */
   std::vector<const Type*> params;