diff options
author | Chris Lattner <sabre@nondot.org> | 2005-12-06 17:30:58 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2005-12-06 17:30:58 +0000 |
commit | ed74a4ef3b813bed0c0f4bb5af42229d50133da2 (patch) | |
tree | f43579d377defe0d6bd80d7cd6fd51b112d9438c /lib/Linker | |
parent | 89644753a6b130eca3345e9c71afbe7e32776455 (diff) |
Fix test/Regression/Linker/2005-12-06-AppendingZeroLengthArrays.ll and
PR662. Thanks to Markus for providing me with a ton of files to
reproduce the problem!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24619 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Linker')
-rw-r--r-- | lib/Linker/LinkModules.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Linker/LinkModules.cpp b/lib/Linker/LinkModules.cpp index d20044fa3c..732fdf919e 100644 --- a/lib/Linker/LinkModules.cpp +++ b/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(), |