diff options
author | Ted Kremenek <kremenek@apple.com> | 2008-09-13 05:16:45 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2008-09-13 05:16:45 +0000 |
commit | a95d3750441ac8ad03e36af8e6e74039c9a3109d (patch) | |
tree | ff6594ca38fba0ebad2d5a63583a909bdfb72a9f /lib/AST/Type.cpp | |
parent | 635d04fe2a14fe79ac9b3802b66f6314ca8bc539 (diff) |
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
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; } |