[llvm] r323558 - [Support] Move PrintEscapedString into the library its declaration is in
Benjamin Kramer via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 26 12:21:02 PST 2018
Author: d0k
Date: Fri Jan 26 12:21:02 2018
New Revision: 323558
URL: http://llvm.org/viewvc/llvm-project?rev=323558&view=rev
Log:
[Support] Move PrintEscapedString into the library its declaration is in
Modified:
llvm/trunk/lib/IR/AsmWriter.cpp
llvm/trunk/lib/Support/StringExtras.cpp
Modified: llvm/trunk/lib/IR/AsmWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/AsmWriter.cpp?rev=323558&r1=323557&r2=323558&view=diff
==============================================================================
--- llvm/trunk/lib/IR/AsmWriter.cpp (original)
+++ llvm/trunk/lib/IR/AsmWriter.cpp Fri Jan 26 12:21:02 2018
@@ -383,16 +383,6 @@ static void PrintCallingConv(unsigned cc
}
}
-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,
Modified: llvm/trunk/lib/Support/StringExtras.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/StringExtras.cpp?rev=323558&r1=323557&r2=323558&view=diff
==============================================================================
--- llvm/trunk/lib/Support/StringExtras.cpp (original)
+++ llvm/trunk/lib/Support/StringExtras.cpp Fri Jan 26 12:21:02 2018
@@ -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);
More information about the llvm-commits
mailing list