diff options
Diffstat (limited to 'lib/AST/Type.cpp')
-rw-r--r-- | lib/AST/Type.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/AST/Type.cpp b/lib/AST/Type.cpp index 2ecc357d95..f836e5b995 100644 --- a/lib/AST/Type.cpp +++ b/lib/AST/Type.cpp @@ -910,7 +910,8 @@ void VariableArrayType::getAsStringInternal(std::string &S) const { 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 ExtVectorType::getAsStringInternal(std::string &S) const { 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; } |