about summary refs log tree commit diff homepage
path: root/lib/Module/KModule.cpp
diff options
context:
space:
mode:
authorAndrea Mattavelli <andreamattavelli@users.noreply.github.com>2016-09-16 10:04:27 +0100
committerDan Liew <delcypher@gmail.com>2016-09-16 10:04:27 +0100
commit1bfdbc61f2e14d8b0f2b5ca45ca8266c363cbfc5 (patch)
treea98b88133d260c70c336f51ff09e727c79ca69dc /lib/Module/KModule.cpp
parent9baab03a58ffb8c74a2c3db40256521050f68049 (diff)
downloadklee-1bfdbc61f2e14d8b0f2b5ca45ca8266c363cbfc5.tar.gz
Avoid internalization of non-standard entry point (i.e. not the main function) (#455)
Diffstat (limited to 'lib/Module/KModule.cpp')
-rw-r--r--lib/Module/KModule.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Module/KModule.cpp b/lib/Module/KModule.cpp
index 01165e94..57346a31 100644
--- a/lib/Module/KModule.cpp
+++ b/lib/Module/KModule.cpp
@@ -132,7 +132,7 @@ KModule::~KModule() {
 /***/
 
 namespace llvm {
-extern void Optimize(Module*);
+extern void Optimize(Module *, const std::string &EntryPoint);
 }
 
 // what a hack
@@ -308,7 +308,7 @@ void KModule::prepare(const Interpreter::ModuleOptions &opts,
   pm.run(*module);
 
   if (opts.Optimize)
-    Optimize(module);
+    Optimize(module, opts.EntryPoint);
 #if LLVM_VERSION_CODE < LLVM_VERSION(3, 3)
   // Force importing functions required by intrinsic lowering. Kind of
   // unfortunate clutter when we don't need them but we won't know