summaryrefslogtreecommitdiffstats
path: root/llvm/lib/LTO/LTOCodeGenerator.cpp
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2013-10-16 08:59:57 +0000
committerBill Wendling <isanbard@gmail.com>2013-10-16 08:59:57 +0000
commit91e6f6e198b07b9c7eda858a39992ce5060f1e15 (patch)
treebba3722ba16608d20ce24a3d92a9a09f3585a953 /llvm/lib/LTO/LTOCodeGenerator.cpp
parentec8ec333f02015fdbaacf9573ea703fd900092c5 (diff)
downloadbcm5719-llvm-91e6f6e198b07b9c7eda858a39992ce5060f1e15.tar.gz
bcm5719-llvm-91e6f6e198b07b9c7eda858a39992ce5060f1e15.zip
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. llvm-svn: 192778
Diffstat (limited to 'llvm/lib/LTO/LTOCodeGenerator.cpp')
-rw-r--r--llvm/lib/LTO/LTOCodeGenerator.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/LTO/LTOCodeGenerator.cpp b/llvm/lib/LTO/LTOCodeGenerator.cpp
index e35e33666ec..88f606160d8 100644
--- a/llvm/lib/LTO/LTOCodeGenerator.cpp
+++ b/llvm/lib/LTO/LTOCodeGenerator.cpp
@@ -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();
OpenPOWER on IntegriCloud