From e69170a11079504e1b20ec79296925f295dc01c0 Mon Sep 17 00:00:00 2001 From: Alp Toker Date: Thu, 26 Jun 2014 22:52:05 +0000 Subject: Revert "Introduce a string_ostream string builder facilty" Temporarily back out commits r211749, r211752 and r211754. llvm-svn: 211814 --- llvm/lib/Transforms/Instrumentation/DebugIR.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'llvm/lib/Transforms/Instrumentation/DebugIR.cpp') diff --git a/llvm/lib/Transforms/Instrumentation/DebugIR.cpp b/llvm/lib/Transforms/Instrumentation/DebugIR.cpp index 56e60e69849..f2f1738808b 100644 --- a/llvm/lib/Transforms/Instrumentation/DebugIR.cpp +++ b/llvm/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 Type"; - return OS.str(); + TypeStream << "Printing Type"; + TypeStream.flush(); + return TypeName; } /// Returns the MDNode that represents type T if it is already created, or 0 -- cgit v1.2.3