Simplify. NFC.
authorRafael Espindola <rafael.espindola@gmail.com>
Mon, 13 Nov 2017 23:06:54 +0000 (23:06 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Mon, 13 Nov 2017 23:06:54 +0000 (23:06 +0000)
llvm-svn: 318104

llvm/lib/Support/LockFileManager.cpp

index 81f3fd0..ad749e0 100644 (file)
@@ -273,9 +273,8 @@ std::string LockFileManager::getErrorMessage() const {
     std::string ErrCodeMsg = Error->message();
     raw_string_ostream OSS(Str);
     if (!ErrCodeMsg.empty())
-      OSS << ": " << Error->message();
-    OSS.flush();
-    return Str;
+      OSS << ": " << ErrCodeMsg;
+    return OSS.str();
   }
   return "";
 }