Displaying 1 result from an estimated 1 matches for "destroyllvmmodul".
Did you mean:
destroyllvmmodule
2014 Jan 22
2
[LLVMdev] [RFC] LTO: deallocating llvm::Module inside lto_codegen_add_module
...omething akin to:
diff --git a/include/llvm/LTO/LTOModule.h b/include/llvm/LTO/LTOModule.h
index c70afa4..1180e58 100644
--- a/include/llvm/LTO/LTOModule.h
+++ b/include/llvm/LTO/LTOModule.h
@@ -164,6 +164,11 @@ public:
return _asm_undefines;
}
+ void destroyLLVMModule() {
+ _module.reset();
+ _target.reset();
+ }
+
private:
/// parseMetadata - Parse metadata from the module
// FIXME: it only parses "Linker Options" metadata at the moment
diff --git a/lib/LTO/LTOCodeGenerator.cpp b/lib/LTO/LTOCodeGenerator....