summaryrefslogtreecommitdiff
path: root/lld/lib/Core/Error.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2020-07-26 19:36:28 +0000
committerDimitry Andric <dim@FreeBSD.org>2020-07-26 19:36:28 +0000
commitcfca06d7963fa0909f90483b42a6d7d194d01e08 (patch)
tree209fb2a2d68f8f277793fc8df46c753d31bc853b /lld/lib/Core/Error.cpp
parent706b4fc47bbc608932d3b491ae19a3b9cde9497b (diff)
Notes
Diffstat (limited to 'lld/lib/Core/Error.cpp')
-rw-r--r--lld/lib/Core/Error.cpp5
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;