From dc55caa720c02fdccc4892ed198050f808613e4a Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 17 Oct 2004 02:44:45 +0000 Subject: [PATCH] I forgot that sparc no longer uses the shared asmwriter. Give it support for undef. llvm-svn: 17075 --- lib/Target/SparcV9/SparcV9AsmPrinter.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/Target/SparcV9/SparcV9AsmPrinter.cpp b/lib/Target/SparcV9/SparcV9AsmPrinter.cpp index 1c0d1c000ad..8000a014fc9 100644 --- a/lib/Target/SparcV9/SparcV9AsmPrinter.cpp +++ b/lib/Target/SparcV9/SparcV9AsmPrinter.cpp @@ -323,7 +323,9 @@ void AsmPrinter::printSingleConstantValue(const Constant* CV) { O << ConstantExprToString(CE, TM) << "\n"; } else if (CV->getType()->isPrimitiveType()) { // Check primitive types last - if (CV->getType()->isFloatingPoint()) { + if (isa(CV)) { + O << "0\n"; + } else if (CV->getType()->isFloatingPoint()) { // FP Constants are printed as integer constants to avoid losing // precision... double Val = cast(CV)->getValue(); @@ -385,7 +387,7 @@ void AsmPrinter::printConstantValueOnly(const Constant* CV, } assert(sizeSoFar == cvsLayout->StructSize && "Layout of constant struct may be incorrect!"); - } else if (isa(CV)) { + } else if (isa(CV) || isa(CV)) { PrintZeroBytesToPad(TM.getTargetData().getTypeSize(CV->getType())); } else printSingleConstantValue(CV);