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 | d490d4f02314ecf8aa85b6b44d54e13701b4b950 (patch) | |
tree | 4572d6be4106e4c88d26c959900ab5342ac14d21 /llvm/lib/Linker/LinkModules.cpp | |
parent | 98dcd12c28acf1f32ddd60b64636d33e0175f56b (diff) | |
download | bcm5719-llvm-d490d4f02314ecf8aa85b6b44d54e13701b4b950.tar.gz bcm5719-llvm-d490d4f02314ecf8aa85b6b44d54e13701b4b950.zip |
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!
llvm-svn: 24619
Diffstat (limited to 'llvm/lib/Linker/LinkModules.cpp')
-rw-r--r-- | llvm/lib/Linker/LinkModules.cpp | 2 |
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(), |