[llvm] r268856 - ErrorInfoBase::message(): Don't use raw_string_ostream's buffer, Msg, before closing. Use raw_string_ostream::str() to flush the buffer.
NAKAMURA Takumi via llvm-commits
llvm-commits at lists.llvm.org
Sat May 7 01:43:11 PDT 2016
Author: chapuni
Date: Sat May 7 03:43:11 2016
New Revision: 268856
URL: http://llvm.org/viewvc/llvm-project?rev=268856&view=rev
Log:
ErrorInfoBase::message(): Don't use raw_string_ostream's buffer, Msg, before closing. Use raw_string_ostream::str() to flush the buffer.
Modified:
llvm/trunk/include/llvm/Support/Error.h
Modified: llvm/trunk/include/llvm/Support/Error.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/Error.h?rev=268856&r1=268855&r2=268856&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/Error.h (original)
+++ llvm/trunk/include/llvm/Support/Error.h Sat May 7 03:43:11 2016
@@ -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.
More information about the llvm-commits
mailing list