mirror of
https://github.com/RPCS3/llvm.git
synced 2024-11-28 14:10:55 +00:00
[Support] Move PrintEscapedString into the library its declaration is in
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@323558 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
99509aa735
commit
e4a395e88a
@ -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