summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/PowerPC/PowerPCAsmPrinter.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-12-12 20:36:19 +0000
committerChris Lattner <sabre@nondot.org>2004-12-12 20:36:19 +0000
commitcbd47631ea6bb20114af70ee4e5d494237d21f77 (patch)
tree64cebc42e466cc4ab31076f6a98be6254ea829c0 /llvm/lib/Target/PowerPC/PowerPCAsmPrinter.cpp
parenta0dffecfbcf5c5c6a3704fc605e8c7b9e8d79307 (diff)
downloadbcm5719-llvm-cbd47631ea6bb20114af70ee4e5d494237d21f77.tar.gz
bcm5719-llvm-cbd47631ea6bb20114af70ee4e5d494237d21f77.zip
Fix Regression/CodeGen/PowerPC/2004-12-12-ZeroSizeCommon.ll, and all programs
when compiled with debug information. llvm-svn: 18835
Diffstat (limited to 'llvm/lib/Target/PowerPC/PowerPCAsmPrinter.cpp')
-rw-r--r--llvm/lib/Target/PowerPC/PowerPCAsmPrinter.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/Target/PowerPC/PowerPCAsmPrinter.cpp b/llvm/lib/Target/PowerPC/PowerPCAsmPrinter.cpp
index cc8c1f3e420..48eddb9527a 100644
--- a/llvm/lib/Target/PowerPC/PowerPCAsmPrinter.cpp
+++ b/llvm/lib/Target/PowerPC/PowerPCAsmPrinter.cpp
@@ -471,6 +471,7 @@ bool DarwinAsmPrinter::doFinalization(Module &M) {
(I->hasInternalLinkage() || I->hasWeakLinkage() ||
I->hasLinkOnceLinkage())) {
SwitchSection(O, CurSection, ".data");
+ if (Size == 0) Size = 1; // .comm Foo, 0 is undefined, avoid it.
if (I->hasInternalLinkage())
O << ".lcomm " << name << "," << Size << "," << Align;
else
OpenPOWER on IntegriCloud