mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
remove one form of EmitString, just use EmitBytes instead. We must
be careful to add a \0 at the end though, because EmitString didn't do this. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94277 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -715,29 +715,6 @@ static void printStringChar(formatted_raw_ostream &O, unsigned char C) {
|
||||
}
|
||||
}
|
||||
|
||||
/// EmitString - Emit a string with quotes and a null terminator.
|
||||
/// Special characters are emitted properly.
|
||||
/// \literal (Eg. '\t') \endliteral
|
||||
void AsmPrinter::EmitString(const StringRef String) const {
|
||||
EmitString(String.data(), String.size());
|
||||
}
|
||||
|
||||
void AsmPrinter::EmitString(const char *String, unsigned Size) const {
|
||||
const char* AscizDirective = MAI->getAscizDirective();
|
||||
if (AscizDirective)
|
||||
O << AscizDirective;
|
||||
else
|
||||
O << MAI->getAsciiDirective();
|
||||
O << '\"';
|
||||
for (unsigned i = 0; i < Size; ++i)
|
||||
printStringChar(O, String[i]);
|
||||
if (AscizDirective)
|
||||
O << '\"';
|
||||
else
|
||||
O << "\\0\"";
|
||||
}
|
||||
|
||||
|
||||
/// EmitFile - Emit a .file directive.
|
||||
void AsmPrinter::EmitFile(unsigned Number, StringRef Name) const {
|
||||
O << "\t.file\t" << Number << " \"";
|
||||
|
Reference in New Issue
Block a user