From 074a68d30bfb2f597d4d0ea37ce8fc6cb48805bb Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Sat, 7 May 2016 08:43:11 +0000 Subject: [PATCH] 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 --- include/llvm/Support/Error.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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. -- 2.11.0