OSDN Git Service

ErrorInfoBase::message(): Don't use raw_string_ostream's buffer, Msg, before closing...
authorNAKAMURA Takumi <geek4civic@gmail.com>
Sat, 7 May 2016 08:43:11 +0000 (08:43 +0000)
committerNAKAMURA Takumi <geek4civic@gmail.com>
Sat, 7 May 2016 08:43:11 +0000 (08:43 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268856 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Support/Error.h

index ed82148..2452ffa 100644 (file)
@@ -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.