diff options
author | Chris Lattner <sabre@nondot.org> | 2003-10-19 02:51:01 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-10-19 02:51:01 +0000 |
commit | b1698411660a68d1dc0588a5536a5689de74b6d8 (patch) | |
tree | 67938f356cb2d9e9c7c72abdae84ba9434495f42 | |
parent | 0b1fe84e810f3b424009aef90f8c667c5c1c5784 (diff) | |
download | external_llvm-b1698411660a68d1dc0588a5536a5689de74b6d8.zip external_llvm-b1698411660a68d1dc0588a5536a5689de74b6d8.tar.gz external_llvm-b1698411660a68d1dc0588a5536a5689de74b6d8.tar.bz2 |
.string adds an implicit zero at the end. This is not what we wanted.
This fixes PR#44.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9252 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Target/X86/Printer.cpp | 2 | ||||
-rw-r--r-- | lib/Target/X86/X86AsmPrinter.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/Target/X86/Printer.cpp b/lib/Target/X86/Printer.cpp index f8c006c..aaebb5b 100644 --- a/lib/Target/X86/Printer.cpp +++ b/lib/Target/X86/Printer.cpp @@ -329,7 +329,7 @@ void Printer::printConstantValueOnly(const Constant *CV) { } else if (const ConstantArray *CVA = dyn_cast<ConstantArray>(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<Use> &constValues = CVA->getValues(); for (unsigned i=0; i < constValues.size(); i++) diff --git a/lib/Target/X86/X86AsmPrinter.cpp b/lib/Target/X86/X86AsmPrinter.cpp index f8c006c..aaebb5b 100644 --- a/lib/Target/X86/X86AsmPrinter.cpp +++ b/lib/Target/X86/X86AsmPrinter.cpp @@ -329,7 +329,7 @@ void Printer::printConstantValueOnly(const Constant *CV) { } else if (const ConstantArray *CVA = dyn_cast<ConstantArray>(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<Use> &constValues = CVA->getValues(); for (unsigned i=0; i < constValues.size(); i++) |