summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lld/include/lld/Core/Error.h4
-rw-r--r--lld/lib/Core/Error.cpp8
2 files changed, 1 insertions, 11 deletions
diff --git a/lld/include/lld/Core/Error.h b/lld/include/lld/Core/Error.h
index 8150ab8396b..b0bf73b1cb7 100644
--- a/lld/include/lld/Core/Error.h
+++ b/lld/include/lld/Core/Error.h
@@ -38,9 +38,7 @@ inline std::error_code make_error_code(YamlReaderError e) {
/// supplied error string.
/// Note: Once ErrorOr<> is updated to work with errors other than error_code,
/// this can be updated to return some other kind of error.
-std::error_code make_dynamic_error_code(const char *msg);
std::error_code make_dynamic_error_code(StringRef msg);
-std::error_code make_dynamic_error_code(const Twine &msg);
/// Generic error.
///
@@ -54,7 +52,7 @@ public:
void log(llvm::raw_ostream &OS) const override;
std::error_code convertToErrorCode() const override {
- return make_dynamic_error_code(StringRef(getMessage()));
+ return make_dynamic_error_code(getMessage());
}
private:
diff --git a/lld/lib/Core/Error.cpp b/lld/lib/Core/Error.cpp
index 097318efb2f..4df1ce120bd 100644
--- a/lld/lib/Core/Error.cpp
+++ b/lld/lib/Core/Error.cpp
@@ -76,18 +76,10 @@ private:
static dynamic_error_category categorySingleton;
-std::error_code make_dynamic_error_code(const char *msg) {
- return make_dynamic_error_code(StringRef(msg));
-}
-
std::error_code make_dynamic_error_code(StringRef msg) {
return std::error_code(categorySingleton.add(msg), categorySingleton);
}
-std::error_code make_dynamic_error_code(const Twine &msg) {
- return std::error_code(categorySingleton.add(msg.str()), categorySingleton);
-}
-
char GenericError::ID = 0;
GenericError::GenericError(Twine Msg) : Msg(Msg.str()) { }
OpenPOWER on IntegriCloud