Add a 'deleteModule' method to the Linker class.

This deletes the Module ivar instead of having the LTO code generater do it. It
also sets the pointer to 'NULL', so that if it's used again it will abort
quickly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192778 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Bill Wendling
2013-10-16 08:59:57 +00:00
parent 32c24da373
commit b4a0ba1718
3 changed files with 11 additions and 1 deletions

View File

@ -66,7 +66,10 @@ LTOCodeGenerator::LTOCodeGenerator()
LTOCodeGenerator::~LTOCodeGenerator() {
delete TargetMach;
delete NativeObjectFile;
delete Linker.getModule();
TargetMach = NULL;
NativeObjectFile = NULL;
Linker.deleteModule();
for (std::vector<char *>::iterator I = CodegenOptions.begin(),
E = CodegenOptions.end();