[llvm-commits] [llvm] r53237 - in /llvm/trunk: include/llvm/CodeGen/AsmPrinter.h lib/CodeGen/AsmPrinter.cpp lib/Target/X86/X86ATTAsmPrinter.cpp
Evan Cheng
evan.cheng at apple.com
Tue Jul 8 09:41:12 PDT 2008
Author: evancheng
Date: Tue Jul 8 11:40:43 2008
New Revision: 53237
URL: http://llvm.org/viewvc/llvm-project?rev=53237&view=rev
Log:
Unbreak C++ tests on x86 Darwin.
Modified:
llvm/trunk/include/llvm/CodeGen/AsmPrinter.h
llvm/trunk/lib/CodeGen/AsmPrinter.cpp
llvm/trunk/lib/Target/X86/X86ATTAsmPrinter.cpp
Modified: llvm/trunk/include/llvm/CodeGen/AsmPrinter.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/AsmPrinter.h?rev=53237&r1=53236&r2=53237&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/AsmPrinter.h (original)
+++ llvm/trunk/include/llvm/CodeGen/AsmPrinter.h Tue Jul 8 11:40:43 2008
@@ -351,8 +351,9 @@
/// printSuffixedName - This prints a name with preceding
/// getPrivateGlobalPrefix and the specified suffix, handling quoted names
/// correctly.
- void printSuffixedName(const char *Name, const char* Suffix);
- void printSuffixedName(std::string &Name, const char* Suffix);
+ void printSuffixedName(const char *Name, const char *Suffix,
+ const char *Prefix = 0);
+ void printSuffixedName(const std::string &Name, const char* Suffix);
private:
void EmitLLVMUsedList(Constant *List);
Modified: llvm/trunk/lib/CodeGen/AsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter.cpp?rev=53237&r1=53236&r2=53237&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter.cpp Tue Jul 8 11:40:43 2008
@@ -1445,14 +1445,23 @@
}
}
-void AsmPrinter::printSuffixedName(const char *Name, const char* Suffix) {
+void AsmPrinter::printSuffixedName(const char *Name, const char *Suffix,
+ const char *Prefix) {
if (Name[0]=='\"')
- O << '\"' << TAI->getPrivateGlobalPrefix() <<
- Name[1] << Suffix << '\"';
+ O << '\"';
+ O << TAI->getPrivateGlobalPrefix();
+ if (Prefix) O << Prefix;
+ if (Name[0]=='\"')
+ O << '\"';
+ if (Name[0]=='\"')
+ O << Name[1];
else
- O << TAI->getPrivateGlobalPrefix() << Name << Suffix;
+ O << Name;
+ O << Suffix;
+ if (Name[0]=='\"')
+ O << '\"';
}
-void AsmPrinter::printSuffixedName(std::string &Name, const char* Suffix) {
+void AsmPrinter::printSuffixedName(const std::string &Name, const char* Suffix) {
printSuffixedName(Name.c_str(), Suffix);
}
Modified: llvm/trunk/lib/Target/X86/X86ATTAsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ATTAsmPrinter.cpp?rev=53237&r1=53236&r2=53237&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ATTAsmPrinter.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ATTAsmPrinter.cpp Tue Jul 8 11:40:43 2008
@@ -977,8 +977,7 @@
/// printGVStub - Print stub for a global value.
///
void X86ATTAsmPrinter::printGVStub(const char *GV, const char *Prefix) {
- if (Prefix) O << Prefix;
- printSuffixedName(GV, "$non_lazy_ptr");
+ printSuffixedName(GV, "$non_lazy_ptr", Prefix);
O << ":\n\t.indirect_symbol ";
if (Prefix) O << Prefix;
O << GV << "\n\t.long\t0\n";
More information about the llvm-commits
mailing list