diff options
Diffstat (limited to 'gnu/llvm/lib/ExecutionEngine/ExecutionEngineBindings.cpp')
-rw-r--r-- | gnu/llvm/lib/ExecutionEngine/ExecutionEngineBindings.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gnu/llvm/lib/ExecutionEngine/ExecutionEngineBindings.cpp b/gnu/llvm/lib/ExecutionEngine/ExecutionEngineBindings.cpp index ff7c4dce0d5..d6b209a91d7 100644 --- a/gnu/llvm/lib/ExecutionEngine/ExecutionEngineBindings.cpp +++ b/gnu/llvm/lib/ExecutionEngine/ExecutionEngineBindings.cpp @@ -17,6 +17,7 @@ #include "llvm/ExecutionEngine/RTDyldMemoryManager.h" #include "llvm/IR/DerivedTypes.h" #include "llvm/IR/Module.h" +#include "llvm/Support/CodeGenCWrappers.h" #include "llvm/Support/ErrorHandling.h" #include "llvm/Target/TargetOptions.h" #include <cstring> @@ -215,10 +216,12 @@ void LLVMDisposeExecutionEngine(LLVMExecutionEngineRef EE) { } void LLVMRunStaticConstructors(LLVMExecutionEngineRef EE) { + unwrap(EE)->finalizeObject(); unwrap(EE)->runStaticConstructorsDestructors(false); } void LLVMRunStaticDestructors(LLVMExecutionEngineRef EE) { + unwrap(EE)->finalizeObject(); unwrap(EE)->runStaticConstructorsDestructors(true); } |