diff options
| author | Chris Lattner <sabre@nondot.org> | 2001-10-29 13:39:38 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2001-10-29 13:39:38 +0000 |
| commit | 41a8289eb886cffaf9e7dafe11d994e41b0f87e8 (patch) | |
| tree | 25925ac5729ea96f99a2c38dfb2e1f6af968f146 /llvm/lib/Target/Sparc | |
| parent | e10ec076e9e0cec047495c00dc159ed455acd41e (diff) | |
| download | bcm5719-llvm-41a8289eb886cffaf9e7dafe11d994e41b0f87e8.tar.gz bcm5719-llvm-41a8289eb886cffaf9e7dafe11d994e41b0f87e8.zip | |
Check in to use moved stringizing code
llvm-svn: 1024
Diffstat (limited to 'llvm/lib/Target/Sparc')
| -rw-r--r-- | llvm/lib/Target/Sparc/EmitAssembly.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/llvm/lib/Target/Sparc/EmitAssembly.cpp b/llvm/lib/Target/Sparc/EmitAssembly.cpp index 575355df3fb..9d9cba12f2c 100644 --- a/llvm/lib/Target/Sparc/EmitAssembly.cpp +++ b/llvm/lib/Target/Sparc/EmitAssembly.cpp @@ -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 << "," |

