diff options
Diffstat (limited to 'llvm/lib/Linker/LinkModules.cpp')
-rw-r--r-- | llvm/lib/Linker/LinkModules.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/Linker/LinkModules.cpp b/llvm/lib/Linker/LinkModules.cpp index 767d465d1be..dc002d8a576 100644 --- a/llvm/lib/Linker/LinkModules.cpp +++ b/llvm/lib/Linker/LinkModules.cpp @@ -1721,7 +1721,9 @@ void Linker::deleteModule() { bool Linker::linkInModule(Module *Src) { ModuleLinker TheLinker(Composite, IdentifiedStructTypes, Src, DiagnosticHandler); - return TheLinker.run(); + bool RetCode = TheLinker.run(); + Composite->dropTriviallyDeadConstantArrays(); + return RetCode; } //===----------------------------------------------------------------------===// |