diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2020-07-26 19:36:28 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2020-07-26 19:36:28 +0000 |
commit | cfca06d7963fa0909f90483b42a6d7d194d01e08 (patch) | |
tree | 209fb2a2d68f8f277793fc8df46c753d31bc853b /lld/lib/Core | |
parent | 706b4fc47bbc608932d3b491ae19a3b9cde9497b (diff) |
Notes
Diffstat (limited to 'lld/lib/Core')
-rw-r--r-- | lld/lib/Core/Error.cpp | 5 | ||||
-rw-r--r-- | lld/lib/Core/Resolver.cpp | 2 |
2 files changed, 4 insertions, 3 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; diff --git a/lld/lib/Core/Resolver.cpp b/lld/lib/Core/Resolver.cpp index d1c3d8159f58..17a46056f00c 100644 --- a/lld/lib/Core/Resolver.cpp +++ b/lld/lib/Core/Resolver.cpp @@ -298,7 +298,7 @@ void Resolver::updateReferences() { for (const OwningAtomPtr<Atom> &atom : _atoms) { if (const DefinedAtom *defAtom = dyn_cast<DefinedAtom>(atom.get())) { for (const Reference *ref : *defAtom) { - // A reference of type kindAssociate should't be updated. + // A reference of type kindAssociate shouldn't be updated. // Instead, an atom having such reference will be removed // if the target atom is coalesced away, so that they will // go away as a group. |