From 25188c95de6bd74e15dad873ff5fc7e7c1330191 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Thu, 12 Jun 2014 01:45:43 +0000 Subject: [PATCH] Don't import error_category into the llvm namespace. llvm-svn: 210733 --- llvm/include/llvm/Object/Error.h | 2 +- llvm/include/llvm/ProfileData/InstrProf.h | 2 +- llvm/include/llvm/Support/system_error.h | 1 - llvm/lib/Bitcode/Reader/BitcodeReader.cpp | 4 ++-- llvm/lib/Bitcode/Reader/BitcodeReader.h | 2 +- llvm/lib/Object/Error.cpp | 4 ++-- llvm/lib/ProfileData/InstrProf.cpp | 4 ++-- llvm/tools/llvm-readobj/Error.cpp | 4 ++-- llvm/tools/llvm-readobj/Error.h | 2 +- llvm/tools/obj2yaml/Error.cpp | 4 ++-- llvm/tools/obj2yaml/Error.h | 2 +- 11 files changed, 15 insertions(+), 16 deletions(-) diff --git a/llvm/include/llvm/Object/Error.h b/llvm/include/llvm/Object/Error.h index 15824f8..3db9fa4 100644 --- a/llvm/include/llvm/Object/Error.h +++ b/llvm/include/llvm/Object/Error.h @@ -19,7 +19,7 @@ namespace llvm { namespace object { -const error_category &object_category(); +const std::error_category &object_category(); enum class object_error { success = 0, diff --git a/llvm/include/llvm/ProfileData/InstrProf.h b/llvm/include/llvm/ProfileData/InstrProf.h index 755ba36..b44b92e 100644 --- a/llvm/include/llvm/ProfileData/InstrProf.h +++ b/llvm/include/llvm/ProfileData/InstrProf.h @@ -20,7 +20,7 @@ namespace llvm { -const error_category &instrprof_category(); +const std::error_category &instrprof_category(); enum class instrprof_error { success = 0, diff --git a/llvm/include/llvm/Support/system_error.h b/llvm/include/llvm/Support/system_error.h index 8364517..932fc1e 100644 --- a/llvm/include/llvm/Support/system_error.h +++ b/llvm/include/llvm/Support/system_error.h @@ -19,7 +19,6 @@ namespace llvm { using std::error_code; using std::generic_category; -using std::error_category; using std::make_error_code; } diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp index 849c548..a5eec0f 100644 --- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp +++ b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp @@ -3300,7 +3300,7 @@ error_code BitcodeReader::InitLazyStream() { } namespace { -class BitcodeErrorCategoryType : public error_category { +class BitcodeErrorCategoryType : public std::error_category { const char *name() const LLVM_NOEXCEPT override { return "llvm.bitcode"; } @@ -3351,7 +3351,7 @@ class BitcodeErrorCategoryType : public error_category { }; } -const error_category &BitcodeReader::BitcodeErrorCategory() { +const std::error_category &BitcodeReader::BitcodeErrorCategory() { static BitcodeErrorCategoryType O; return O; } diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.h b/llvm/lib/Bitcode/Reader/BitcodeReader.h index 593d8f9..65821caf 100644 --- a/llvm/lib/Bitcode/Reader/BitcodeReader.h +++ b/llvm/lib/Bitcode/Reader/BitcodeReader.h @@ -193,7 +193,7 @@ class BitcodeReader : public GVMaterializer { /// not need this flag. bool UseRelativeIDs; - static const error_category &BitcodeErrorCategory(); + static const std::error_category &BitcodeErrorCategory(); public: enum ErrorType { diff --git a/llvm/lib/Object/Error.cpp b/llvm/lib/Object/Error.cpp index 39d765f..0a29cac 100644 --- a/llvm/lib/Object/Error.cpp +++ b/llvm/lib/Object/Error.cpp @@ -18,7 +18,7 @@ using namespace llvm; using namespace object; namespace { -class _object_error_category : public error_category { +class _object_error_category : public std::error_category { public: const char* name() const LLVM_NOEXCEPT override; std::string message(int ev) const override; @@ -55,7 +55,7 @@ _object_error_category::default_error_condition(int EV) const { return std::errc::invalid_argument; } -const error_category &object::object_category() { +const std::error_category &object::object_category() { static _object_error_category o; return o; } diff --git a/llvm/lib/ProfileData/InstrProf.cpp b/llvm/lib/ProfileData/InstrProf.cpp index 88ae758..628edfb 100644 --- a/llvm/lib/ProfileData/InstrProf.cpp +++ b/llvm/lib/ProfileData/InstrProf.cpp @@ -18,7 +18,7 @@ using namespace llvm; namespace { -class InstrProfErrorCategoryType : public error_category { +class InstrProfErrorCategoryType : public std::error_category { const char *name() const LLVM_NOEXCEPT override { return "llvm.instrprof"; } std::string message(int IE) const override { instrprof_error E = static_cast(IE); @@ -61,7 +61,7 @@ class InstrProfErrorCategoryType : public error_category { }; } -const error_category &llvm::instrprof_category() { +const std::error_category &llvm::instrprof_category() { static InstrProfErrorCategoryType C; return C; } diff --git a/llvm/tools/llvm-readobj/Error.cpp b/llvm/tools/llvm-readobj/Error.cpp index 35e0a48..4245e8d 100644 --- a/llvm/tools/llvm-readobj/Error.cpp +++ b/llvm/tools/llvm-readobj/Error.cpp @@ -17,7 +17,7 @@ using namespace llvm; namespace { -class _readobj_error_category : public error_category { +class _readobj_error_category : public std::error_category { public: const char* name() const LLVM_NOEXCEPT override; std::string message(int ev) const override; @@ -56,7 +56,7 @@ _readobj_error_category::default_error_condition(int EV) const { } namespace llvm { -const error_category &readobj_category() { +const std::error_category &readobj_category() { static _readobj_error_category o; return o; } diff --git a/llvm/tools/llvm-readobj/Error.h b/llvm/tools/llvm-readobj/Error.h index b3aab32..b4ffb82 100644 --- a/llvm/tools/llvm-readobj/Error.h +++ b/llvm/tools/llvm-readobj/Error.h @@ -18,7 +18,7 @@ namespace llvm { -const error_category &readobj_category(); +const std::error_category &readobj_category(); enum class readobj_error { success = 0, diff --git a/llvm/tools/obj2yaml/Error.cpp b/llvm/tools/obj2yaml/Error.cpp index 3034e08..5b07b9c 100644 --- a/llvm/tools/obj2yaml/Error.cpp +++ b/llvm/tools/obj2yaml/Error.cpp @@ -13,7 +13,7 @@ using namespace llvm; namespace { -class _obj2yaml_error_category : public error_category { +class _obj2yaml_error_category : public std::error_category { public: const char *name() const LLVM_NOEXCEPT override; std::string message(int ev) const override; @@ -47,7 +47,7 @@ _obj2yaml_error_category::default_error_condition(int ev) const { } namespace llvm { -const error_category &obj2yaml_category() { + const std::error_category &obj2yaml_category() { static _obj2yaml_error_category o; return o; } diff --git a/llvm/tools/obj2yaml/Error.h b/llvm/tools/obj2yaml/Error.h index 7180d54..b4d13ba 100644 --- a/llvm/tools/obj2yaml/Error.h +++ b/llvm/tools/obj2yaml/Error.h @@ -14,7 +14,7 @@ namespace llvm { -const error_category &obj2yaml_category(); +const std::error_category &obj2yaml_category(); enum class obj2yaml_error { success = 0, -- 2.7.4