aboutsummaryrefslogtreecommitdiffstats
path: root/examples/HowToUseJIT/HowToUseJIT.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/HowToUseJIT/HowToUseJIT.cpp')
-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;
}