mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-13 14:35:54 +00:00
[Support] Move PrintEscapedString into the library its declaration is in
llvm-svn: 323558
This commit is contained in:
parent
56989f6f87
commit
1c3f5cf849
@ -383,16 +383,6 @@ static void PrintCallingConv(unsigned cc, raw_ostream &Out) {
|
||||
}
|
||||
}
|
||||
|
||||
void llvm::PrintEscapedString(StringRef Name, raw_ostream &Out) {
|
||||
for (unsigned i = 0, e = Name.size(); i != e; ++i) {
|
||||
unsigned char C = Name[i];
|
||||
if (isprint(C) && C != '\\' && C != '"')
|
||||
Out << C;
|
||||
else
|
||||
Out << '\\' << hexdigit(C >> 4) << hexdigit(C & 0x0F);
|
||||
}
|
||||
}
|
||||
|
||||
enum PrefixType {
|
||||
GlobalPrefix,
|
||||
ComdatPrefix,
|
||||
|
@ -58,6 +58,16 @@ void llvm::SplitString(StringRef Source,
|
||||
}
|
||||
}
|
||||
|
||||
void llvm::PrintEscapedString(StringRef Name, raw_ostream &Out) {
|
||||
for (unsigned i = 0, e = Name.size(); i != e; ++i) {
|
||||
unsigned char C = Name[i];
|
||||
if (isprint(C) && C != '\\' && C != '"')
|
||||
Out << C;
|
||||
else
|
||||
Out << '\\' << hexdigit(C >> 4) << hexdigit(C & 0x0F);
|
||||
}
|
||||
}
|
||||
|
||||
void llvm::printLowerCase(StringRef String, raw_ostream &Out) {
|
||||
for (const char C : String)
|
||||
Out << toLower(C);
|
||||
|
Loading…
Reference in New Issue
Block a user