summaryrefslogtreecommitdiff
path: root/lib/Transforms/Instrumentation/DebugIR.cpp
diff options
context:
space:
mode:
authorAlp Toker <alp@nuanti.com>2014-06-26 22:52:05 +0000
committerAlp Toker <alp@nuanti.com>2014-06-26 22:52:05 +0000
commit8dd8d5c2b2ad0f9dd1ca01c0a7d8ebac57b8537d (patch)
tree7da91c52380a71a92a895b0c172ae28b83fb6011 /lib/Transforms/Instrumentation/DebugIR.cpp
parenteca517deaa890b1658ed0452704f398ce80e47b8 (diff)
downloadllvm-8dd8d5c2b2ad0f9dd1ca01c0a7d8ebac57b8537d.tar.gz
llvm-8dd8d5c2b2ad0f9dd1ca01c0a7d8ebac57b8537d.tar.bz2
llvm-8dd8d5c2b2ad0f9dd1ca01c0a7d8ebac57b8537d.tar.xz
Revert "Introduce a string_ostream string builder facilty"
Temporarily back out commits r211749, r211752 and r211754. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211814 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Instrumentation/DebugIR.cpp')
-rw-r--r--lib/Transforms/Instrumentation/DebugIR.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/Transforms/Instrumentation/DebugIR.cpp b/lib/Transforms/Instrumentation/DebugIR.cpp
index 56e60e6984..f2f1738808 100644
--- a/lib/Transforms/Instrumentation/DebugIR.cpp
+++ b/lib/Transforms/Instrumentation/DebugIR.cpp
@@ -352,12 +352,14 @@ private:
}
std::string getTypeName(Type *T) {
- string_ostream OS;
+ std::string TypeName;
+ raw_string_ostream TypeStream(TypeName);
if (T)
- T->print(OS);
+ T->print(TypeStream);
else
- OS << "Printing <null> Type";
- return OS.str();
+ TypeStream << "Printing <null> Type";
+ TypeStream.flush();
+ return TypeName;
}
/// Returns the MDNode that represents type T if it is already created, or 0