From: NAKAMURA Takumi Date: Sat, 7 May 2016 08:43:11 +0000 (+0000) Subject: ErrorInfoBase::message(): Don't use raw_string_ostream's buffer, Msg, before closing... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=074a68d30bfb2f597d4d0ea37ce8fc6cb48805bb;p=llvm ErrorInfoBase::message(): Don't use raw_string_ostream's buffer, Msg, before closing. Use raw_string_ostream::str() to flush the buffer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268856 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/Support/Error.h b/include/llvm/Support/Error.h index ed821480a30..2452ffa468f 100644 --- a/include/llvm/Support/Error.h +++ b/include/llvm/Support/Error.h @@ -41,7 +41,7 @@ public: std::string Msg; raw_string_ostream OS(Msg); log(OS); - return Msg; + return OS.str(); } /// Convert this error to a std::error_code.