summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Linker/LinkModules.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Linker/LinkModules.cpp')
-rw-r--r--llvm/lib/Linker/LinkModules.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Linker/LinkModules.cpp b/llvm/lib/Linker/LinkModules.cpp
index d20044fa3c8..732fdf919e3 100644
--- a/llvm/lib/Linker/LinkModules.cpp
+++ b/llvm/lib/Linker/LinkModules.cpp
@@ -748,6 +748,8 @@ static bool LinkAppendingVars(Module *M,
unsigned NewSize = T1->getNumElements() + T2->getNumElements();
ArrayType *NewType = ArrayType::get(T1->getElementType(), NewSize);
+ G1->setName(""); // Clear G1's name in case of a conflict!
+
// Create the new global variable...
GlobalVariable *NG =
new GlobalVariable(NewType, G1->isConstant(), G1->getLinkage(),
OpenPOWER on IntegriCloud