summaryrefslogtreecommitdiff
path: root/lld/lib/Core
diff options
context:
space:
mode:
Diffstat (limited to 'lld/lib/Core')
-rw-r--r--lld/lib/Core/Error.cpp5
-rw-r--r--lld/lib/Core/Resolver.cpp2
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.