Patch by Csaba Hruska!
"Here is a patch what replaces std::ostream with llvm::raw_ostream. This patch
covers the AST library, but ignores Analysis lib."
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56185 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/AST/Type.cpp b/lib/AST/Type.cpp
index 2ecc357..f836e5b 100644
--- a/lib/AST/Type.cpp
+++ b/lib/AST/Type.cpp
@@ -910,7 +910,8 @@
S += '*';
if (getSizeExpr()) {
- std::ostringstream s;
+ std::string SStr;
+ llvm::raw_string_ostream s(SStr);
getSizeExpr()->printPretty(s);
S += s.str();
}
@@ -937,7 +938,8 @@
void TypeOfExpr::getAsStringInternal(std::string &InnerString) const {
if (!InnerString.empty()) // Prefix the basic type, e.g. 'typeof(e) X'.
InnerString = ' ' + InnerString;
- std::ostringstream s;
+ std::string Str;
+ llvm::raw_string_ostream s(Str);
getUnderlyingExpr()->printPretty(s);
InnerString = "typeof(" + s.str() + ")" + InnerString;
}