diff options
Diffstat (limited to 'lld/lib/Core/Error.cpp')
-rw-r--r-- | lld/lib/Core/Error.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lld/lib/Core/Error.cpp b/lld/lib/Core/Error.cpp index f138a81efaab..a4f4b1b8af48 100644 --- a/lld/lib/Core/Error.cpp +++ b/lld/lib/Core/Error.cpp @@ -62,7 +62,7 @@ public: int add(std::string msg) { std::lock_guard<std::recursive_mutex> lock(_mutex); - // Value zero is always the successs value. + // Value zero is always the success value. if (_messages.empty()) _messages.push_back("Success"); _messages.push_back(msg); @@ -78,7 +78,8 @@ private: static dynamic_error_category categorySingleton; std::error_code make_dynamic_error_code(StringRef msg) { - return std::error_code(categorySingleton.add(msg), categorySingleton); + return std::error_code(categorySingleton.add(std::string(msg)), + categorySingleton); } char GenericError::ID = 0; |