summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2014-06-12 01:44:19 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2014-06-12 01:44:19 +0000
commit92d8b456d92927b1a86110dce0a3567062eab801 (patch)
tree2c605476f593a4c6743cc2590317ca1916612ec9
parentacc5d7c9119db84f8a764f0536585e434acd83b8 (diff)
downloadbcm5719-llvm-92d8b456d92927b1a86110dce0a3567062eab801.tar.gz
bcm5719-llvm-92d8b456d92927b1a86110dce0a3567062eab801.zip
Use error_category from the std namespace.
llvm-svn: 210732
-rw-r--r--lld/include/lld/Core/Error.h10
-rw-r--r--lld/lib/Core/Error.cpp22
2 files changed, 16 insertions, 16 deletions
diff --git a/lld/include/lld/Core/Error.h b/lld/include/lld/Core/Error.h
index 12f8c2e318a..e2732c83b0b 100644
--- a/lld/include/lld/Core/Error.h
+++ b/lld/include/lld/Core/Error.h
@@ -19,7 +19,7 @@
namespace lld {
-const llvm::error_category &native_reader_category();
+const std::error_category &native_reader_category();
enum class NativeReaderError {
success = 0,
@@ -34,7 +34,7 @@ inline llvm::error_code make_error_code(NativeReaderError e) {
return llvm::error_code(static_cast<int>(e), native_reader_category());
}
-const llvm::error_category &YamlReaderCategory();
+const std::error_category &YamlReaderCategory();
enum class YamlReaderError {
success = 0,
@@ -46,7 +46,7 @@ inline llvm::error_code make_error_code(YamlReaderError e) {
return llvm::error_code(static_cast<int>(e), YamlReaderCategory());
}
-const llvm::error_category &LinkerScriptReaderCategory();
+const std::error_category &LinkerScriptReaderCategory();
enum class LinkerScriptReaderError {
success = 0,
@@ -58,7 +58,7 @@ inline llvm::error_code make_error_code(LinkerScriptReaderError e) {
}
/// \brief Errors returned by InputGraph functionality
-const llvm::error_category &InputGraphErrorCategory();
+const std::error_category &InputGraphErrorCategory();
enum class InputGraphError {
success = 0,
@@ -72,7 +72,7 @@ inline llvm::error_code make_error_code(InputGraphError e) {
}
/// \brief Errors returned by Reader.
-const llvm::error_category &ReaderErrorCategory();
+const std::error_category &ReaderErrorCategory();
enum class ReaderError {
success = 0,
diff --git a/lld/lib/Core/Error.cpp b/lld/lib/Core/Error.cpp
index e6a3e37250c..210f1ebc62b 100644
--- a/lld/lib/Core/Error.cpp
+++ b/lld/lib/Core/Error.cpp
@@ -18,7 +18,7 @@
using namespace lld;
-class _NativeReaderErrorCategory : public llvm::error_category {
+class _NativeReaderErrorCategory : public std::error_category {
public:
const char* name() const LLVM_NOEXCEPT override {
return "lld.native.reader";
@@ -49,12 +49,12 @@ public:
}
};
-const llvm::error_category &lld::native_reader_category() {
+const std::error_category &lld::native_reader_category() {
static _NativeReaderErrorCategory o;
return o;
}
-class _YamlReaderErrorCategory : public llvm::error_category {
+class _YamlReaderErrorCategory : public std::error_category {
public:
const char* name() const LLVM_NOEXCEPT override {
return "lld.yaml.reader";
@@ -79,12 +79,12 @@ public:
}
};
-const llvm::error_category &lld::YamlReaderCategory() {
+const std::error_category &lld::YamlReaderCategory() {
static _YamlReaderErrorCategory o;
return o;
}
-class _LinkerScriptReaderErrorCategory : public llvm::error_category {
+class _LinkerScriptReaderErrorCategory : public std::error_category {
public:
const char *name() const LLVM_NOEXCEPT override {
return "lld.linker-script.reader";
@@ -110,12 +110,12 @@ public:
}
};
-const llvm::error_category &lld::LinkerScriptReaderCategory() {
+const std::error_category &lld::LinkerScriptReaderCategory() {
static _LinkerScriptReaderErrorCategory o;
return o;
}
-class _InputGraphErrorCategory : public llvm::error_category {
+class _InputGraphErrorCategory : public std::error_category {
public:
const char *name() const LLVM_NOEXCEPT override {
return "lld.inputGraph.parse";
@@ -136,12 +136,12 @@ public:
}
};
-const llvm::error_category &lld::InputGraphErrorCategory() {
+const std::error_category &lld::InputGraphErrorCategory() {
static _InputGraphErrorCategory i;
return i;
}
-class _ReaderErrorCategory : public llvm::error_category {
+class _ReaderErrorCategory : public std::error_category {
public:
const char *name() const LLVM_NOEXCEPT override {
return "lld.inputGraph.parse";
@@ -165,7 +165,7 @@ public:
}
};
-const llvm::error_category &lld::ReaderErrorCategory() {
+const std::error_category &lld::ReaderErrorCategory() {
static _ReaderErrorCategory i;
return i;
}
@@ -179,7 +179,7 @@ namespace lld {
/// Temporary class to enable make_dynamic_error_code() until
/// llvm::ErrorOr<> is updated to work with error encapsulations
/// other than error_code.
-class dynamic_error_category : public llvm::error_category {
+class dynamic_error_category : public std::error_category {
public:
const char *name() const LLVM_NOEXCEPT override {
return "lld.dynamic_error";
OpenPOWER on IntegriCloud