Check in to use moved stringizing code
authorChris Lattner <sabre@nondot.org>
Mon, 29 Oct 2001 13:39:38 +0000 (13:39 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 29 Oct 2001 13:39:38 +0000 (13:39 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1024 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/SparcV9/SparcV9AsmPrinter.cpp

index 575355df3fb5d037b599e50591c80f3546081130..9d9cba12f2c24c74957b38c965cc4319a5825daf 100644 (file)
@@ -399,8 +399,16 @@ SparcAsmPrinter::printConstant(const ConstPoolVal* CV, string valID)
   Out << valID << ":" << endl;
   
   Out << "\t"
-      << TypeToDataDirective(CV->getType()) << "\t"
-      << CV->getStrValue(true) << endl;
+      << TypeToDataDirective(CV->getType()) << "\t";
+
+  if (ConstPoolArray *CPA = dyn_cast<ConstPoolArray>(CV)) {
+    if (isStringCompatible(CPA))
+      Out << getAsCString(CPA) << endl;
+    else
+      Out << CV->getStrValue() << endl;  // TODO: This is broken
+  } else {
+    Out << CV->getStrValue() << endl;    // TODO: this is broken
+  }
   
   Out << "\t.type" << "\t" << valID << ",#object" << endl;
   Out << "\t.size" << "\t" << valID << ","