diff options
author | Bill Wendling <isanbard@gmail.com> | 2013-10-16 08:59:57 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2013-10-16 08:59:57 +0000 |
commit | b4a0ba17183e1b4aa385e81e896c2a95671a40b2 (patch) | |
tree | 7fbdee4c9c414fe320011f76730b3673c111c8b5 /lib/Linker | |
parent | 32c24da3730e8e5ea7df3ce7aeffa257b2e7f02f (diff) | |
download | external_llvm-b4a0ba17183e1b4aa385e81e896c2a95671a40b2.zip external_llvm-b4a0ba17183e1b4aa385e81e896c2a95671a40b2.tar.gz external_llvm-b4a0ba17183e1b4aa385e81e896c2a95671a40b2.tar.bz2 |
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
Diffstat (limited to 'lib/Linker')
-rw-r--r-- | lib/Linker/LinkModules.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Linker/LinkModules.cpp b/lib/Linker/LinkModules.cpp index b343b1c..8f2200e 100644 --- a/lib/Linker/LinkModules.cpp +++ b/lib/Linker/LinkModules.cpp @@ -1352,6 +1352,11 @@ Linker::Linker(Module *M) : Composite(M) { Linker::~Linker() { } +void Linker::deleteModule() { + delete Composite; + Composite = NULL; +} + bool Linker::linkInModule(Module *Src, unsigned Mode, std::string *ErrorMsg) { ModuleLinker TheLinker(Composite, IdentifiedStructTypes, Src, Mode); if (TheLinker.run()) { |