[LTO API] fix memory leakage introduced at r230290.

r230290 released the LLVM module but not the LTOModule.

rdar://19024554


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230544 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Manman Ren
2015-02-25 21:20:53 +00:00
parent 92d1637e2f
commit f2a351a514
2 changed files with 17 additions and 4 deletions

View File

@ -155,6 +155,7 @@ private:
typedef StringMap<uint8_t> StringSet;
void initialize();
void destroyMergedModule();
std::unique_ptr<LLVMContext> OwnedContext;
LLVMContext &Context;
Linker IRLinker;
@ -172,6 +173,7 @@ private:
TargetOptions Options;
lto_diagnostic_handler_t DiagHandler;
void *DiagContext;
LTOModule *OwnedModule;
};
}
#endif