llvm.org GIT mirror llvm / 9ee3431
Don't import error_category into the llvm namespace. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210733 91177308-0d34-0410-b5e6-96231b3b80d8 Rafael Espindola 6 years ago
11 changed file(s) with 15 addition(s) and 16 deletion(s). Raw diff Collapse all Expand all
1818 namespace llvm {
1919 namespace object {
2020
21 const error_category &object_category();
21 const std::error_category &object_category();
2222
2323 enum class object_error {
2424 success = 0,
1919
2020 namespace llvm {
2121
22 const error_category &instrprof_category();
22 const std::error_category &instrprof_category();
2323
2424 enum class instrprof_error {
2525 success = 0,
1818 namespace llvm {
1919 using std::error_code;
2020 using std::generic_category;
21 using std::error_category;
2221 using std::make_error_code;
2322 }
2423
32993299 }
33003300
33013301 namespace {
3302 class BitcodeErrorCategoryType : public error_category {
3302 class BitcodeErrorCategoryType : public std::error_category {
33033303 const char *name() const LLVM_NOEXCEPT override {
33043304 return "llvm.bitcode";
33053305 }
33503350 };
33513351 }
33523352
3353 const error_category &BitcodeReader::BitcodeErrorCategory() {
3353 const std::error_category &BitcodeReader::BitcodeErrorCategory() {
33543354 static BitcodeErrorCategoryType O;
33553355 return O;
33563356 }
192192 /// not need this flag.
193193 bool UseRelativeIDs;
194194
195 static const error_category &BitcodeErrorCategory();
195 static const std::error_category &BitcodeErrorCategory();
196196
197197 public:
198198 enum ErrorType {
1717 using namespace object;
1818
1919 namespace {
20 class _object_error_category : public error_category {
20 class _object_error_category : public std::error_category {
2121 public:
2222 const char* name() const LLVM_NOEXCEPT override;
2323 std::string message(int ev) const override;
5454 return std::errc::invalid_argument;
5555 }
5656
57 const error_category &object::object_category() {
57 const std::error_category &object::object_category() {
5858 static _object_error_category o;
5959 return o;
6060 }
1717 using namespace llvm;
1818
1919 namespace {
20 class InstrProfErrorCategoryType : public error_category {
20 class InstrProfErrorCategoryType : public std::error_category {
2121 const char *name() const LLVM_NOEXCEPT override { return "llvm.instrprof"; }
2222 std::string message(int IE) const override {
2323 instrprof_error E = static_cast(IE);
6060 };
6161 }
6262
63 const error_category &llvm::instrprof_category() {
63 const std::error_category &llvm::instrprof_category() {
6464 static InstrProfErrorCategoryType C;
6565 return C;
6666 }
1616 using namespace llvm;
1717
1818 namespace {
19 class _readobj_error_category : public error_category {
19 class _readobj_error_category : public std::error_category {
2020 public:
2121 const char* name() const LLVM_NOEXCEPT override;
2222 std::string message(int ev) const override;
5555 }
5656
5757 namespace llvm {
58 const error_category &readobj_category() {
58 const std::error_category &readobj_category() {
5959 static _readobj_error_category o;
6060 return o;
6161 }
1717
1818 namespace llvm {
1919
20 const error_category &readobj_category();
20 const std::error_category &readobj_category();
2121
2222 enum class readobj_error {
2323 success = 0,
1212 using namespace llvm;
1313
1414 namespace {
15 class _obj2yaml_error_category : public error_category {
15 class _obj2yaml_error_category : public std::error_category {
1616 public:
1717 const char *name() const LLVM_NOEXCEPT override;
1818 std::string message(int ev) const override;
4646 }
4747
4848 namespace llvm {
49 const error_category &obj2yaml_category() {
49 const std::error_category &obj2yaml_category() {
5050 static _obj2yaml_error_category o;
5151 return o;
5252 }
1313
1414 namespace llvm {
1515
16 const error_category &obj2yaml_category();
16 const std::error_category &obj2yaml_category();
1717
1818 enum class obj2yaml_error {
1919 success = 0,