mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-10-02 21:17:17 +00:00
Avoid unnecessary string construction during asm printing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53215 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1377,7 +1377,7 @@ void AsmPrinter::printBasicBlockLabel(const MachineBasicBlock *MBB,
|
||||
O << ':';
|
||||
if (printComment && MBB->getBasicBlock())
|
||||
O << '\t' << TAI->getCommentString() << ' '
|
||||
<< MBB->getBasicBlock()->getName();
|
||||
<< MBB->getBasicBlock()->getNameStart();
|
||||
}
|
||||
|
||||
/// printPICJumpTableSetLabel - This method prints a set label for the
|
||||
@@ -1445,10 +1445,14 @@ void AsmPrinter::printDataDirective(const Type *type) {
|
||||
}
|
||||
}
|
||||
|
||||
void AsmPrinter::printSuffixedName(std::string &Name, const char* Suffix) {
|
||||
void AsmPrinter::printSuffixedName(const char *Name, const char* Suffix) {
|
||||
if (Name[0]=='\"')
|
||||
O << '\"' << TAI->getPrivateGlobalPrefix() <<
|
||||
Name.substr(1, Name.length()-2) << Suffix << '\"';
|
||||
Name[1] << Suffix << '\"';
|
||||
else
|
||||
O << TAI->getPrivateGlobalPrefix() << Name << Suffix;
|
||||
}
|
||||
|
||||
void AsmPrinter::printSuffixedName(std::string &Name, const char* Suffix) {
|
||||
printSuffixedName(Name.c_str(), Suffix);
|
||||
}
|
||||
|
Reference in New Issue
Block a user