aboutsummaryrefslogtreecommitdiffstats
path: root/examples/HowToUseJIT
diff options
context:
space:
mode:
authorTorok Edwin <edwintorok@gmail.com>2009-04-07 17:23:02 +0000
committerTorok Edwin <edwintorok@gmail.com>2009-04-07 17:23:02 +0000
commiteb55f3ea3c6a12e5d098f72f3f9a16d4b7e77645 (patch)
treeb793da35332f1226c35e906bebdd064a19c92915 /examples/HowToUseJIT
parentce8f9fe3c9ea50127eab28930506fc3b93390553 (diff)
downloadexternal_llvm-eb55f3ea3c6a12e5d098f72f3f9a16d4b7e77645.zip
external_llvm-eb55f3ea3c6a12e5d098f72f3f9a16d4b7e77645.tar.gz
external_llvm-eb55f3ea3c6a12e5d098f72f3f9a16d4b7e77645.tar.bz2
Another attempt at fixing PR2975.
Types can have references to eachother, so we can't just call destroy on them. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68523 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'examples/HowToUseJIT')
-rw-r--r--examples/HowToUseJIT/HowToUseJIT.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/examples/HowToUseJIT/HowToUseJIT.cpp b/examples/HowToUseJIT/HowToUseJIT.cpp
index 0482df6..b5c6d11 100644
--- a/examples/HowToUseJIT/HowToUseJIT.cpp
+++ b/examples/HowToUseJIT/HowToUseJIT.cpp
@@ -42,6 +42,7 @@
#include "llvm/ExecutionEngine/JIT.h"
#include "llvm/ExecutionEngine/Interpreter.h"
#include "llvm/ExecutionEngine/GenericValue.h"
+#include "llvm/Support/ManagedStatic.h"
#include "llvm/Support/raw_ostream.h"
using namespace llvm;
@@ -109,5 +110,8 @@ int main() {
// Import result of execution:
outs() << "Result: " << gv.IntVal << "\n";
+ EE->freeMachineCodeForFunction(FooF);
+ delete EE;
+ llvm_shutdown();
return 0;
}