From 406ac8e741e0816e41fdab79ae86d7eea87a1472 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 19 Oct 2003 02:51:01 +0000 Subject: [PATCH] .string adds an implicit zero at the end. This is not what we wanted. This fixes PR#44. llvm-svn: 9252 --- llvm/lib/Target/X86/Printer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/lib/Target/X86/Printer.cpp b/llvm/lib/Target/X86/Printer.cpp index f8c006c..aaebb5b 100644 --- a/llvm/lib/Target/X86/Printer.cpp +++ b/llvm/lib/Target/X86/Printer.cpp @@ -329,7 +329,7 @@ void Printer::printConstantValueOnly(const Constant *CV) { } else if (const ConstantArray *CVA = dyn_cast(CV)) { if (isStringCompatible(CVA)) { // print the string alone and return - O << "\t.string\t" << getAsCString(CVA) << "\n"; + O << "\t.ascii\t" << getAsCString(CVA) << "\n"; } else { // Not a string. Print the values in successive locations const std::vector &constValues = CVA->getValues(); for (unsigned i=0; i < constValues.size(); i++) -- 2.7.4