llvm.org GIT mirror llvm / 84e27c2
Add FIXMEs to all derived classes of std::error_category. This helps make clear that we're moving away from std::error_code. Differential Revision: http://reviews.llvm.org/D20592 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270604 91177308-0d34-0410-b5e6-96231b3b80d8 Peter Collingbourne 4 years ago
14 changed file(s) with 42 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
63816381 }
63826382
63836383 namespace {
6384 // FIXME: This class is only here to support the transition to llvm::Error. It
6385 // will be removed once this transition is complete. Clients should prefer to
6386 // deal with the Error value directly, rather than converting to error_code.
63846387 class BitcodeErrorCategoryType : public std::error_category {
63856388 const char *name() const LLVM_NOEXCEPT override {
63866389 return "llvm.bitcode";
44 using namespace llvm;
55 using namespace llvm::pdb;
66
7 // FIXME: This class is only here to support the transition to llvm::Error. It
8 // will be removed once this transition is complete. Clients should prefer to
9 // deal with the Error value directly, rather than converting to error_code.
710 class DIAErrorCategory : public std::error_category {
811 public:
912 const char *name() const LLVM_NOEXCEPT override { return "llvm.pdb.dia"; }
1414 using namespace llvm::pdb;
1515
1616 namespace {
17 // FIXME: This class is only here to support the transition to llvm::Error. It
18 // will be removed once this transition is complete. Clients should prefer to
19 // deal with the Error value directly, rather than converting to error_code.
1720 class GenericErrorCategory : public std::error_category {
1821 public:
1922 const char *name() const LLVM_NOEXCEPT override { return "llvm.pdb"; }
55 using namespace llvm::pdb;
66
77 namespace {
8 // FIXME: This class is only here to support the transition to llvm::Error. It
9 // will be removed once this transition is complete. Clients should prefer to
10 // deal with the Error value directly, rather than converting to error_code.
811 class RawErrorCategory : public std::error_category {
912 public:
1013 const char *name() const LLVM_NOEXCEPT override { return "llvm.pdb.raw"; }
1919
2020 namespace {
2121
22 // FIXME: This class is only here to support the transition to llvm::Error. It
23 // will be removed once this transition is complete. Clients should prefer to
24 // deal with the Error value directly, rather than converting to error_code.
2225 class OrcErrorCategory : public std::error_category {
2326 public:
2427 const char *name() const LLVM_NOEXCEPT override { return "orc"; }
3333 GenericRTDyldError = 1
3434 };
3535
36 // FIXME: This class is only here to support the transition to llvm::Error. It
37 // will be removed once this transition is complete. Clients should prefer to
38 // deal with the Error value directly, rather than converting to error_code.
3639 class RuntimeDyldErrorCategory : public std::error_category {
3740 public:
3841 const char *name() const LLVM_NOEXCEPT override { return "runtimedyld"; }
1818 using namespace object;
1919
2020 namespace {
21 // FIXME: This class is only here to support the transition to llvm::Error. It
22 // will be removed once this transition is complete. Clients should prefer to
23 // deal with the Error value directly, rather than converting to error_code.
2124 class _object_error_category : public std::error_category {
2225 public:
2326 const char* name() const LLVM_NOEXCEPT override;
555555 llvm_unreachable("A value of coveragemap_error has no message.");
556556 }
557557
558 // FIXME: This class is only here to support the transition to llvm::Error. It
559 // will be removed once this transition is complete. Clients should prefer to
560 // deal with the Error value directly, rather than converting to error_code.
558561 class CoverageMappingErrorCategoryType : public std::error_category {
559562 const char *name() const LLVM_NOEXCEPT override { return "llvm.coveragemap"; }
560563 std::string message(int IE) const override {
6666 llvm_unreachable("A value of instrprof_error has no message.");
6767 }
6868
69 // FIXME: This class is only here to support the transition to llvm::Error. It
70 // will be removed once this transition is complete. Clients should prefer to
71 // deal with the Error value directly, rather than converting to error_code.
6972 class InstrProfErrorCategoryType : public std::error_category {
7073 const char *name() const LLVM_NOEXCEPT override { return "llvm.instrprof"; }
7174 std::string message(int IE) const override {
1919 using namespace llvm;
2020
2121 namespace {
22 // FIXME: This class is only here to support the transition to llvm::Error. It
23 // will be removed once this transition is complete. Clients should prefer to
24 // deal with the Error value directly, rather than converting to error_code.
2225 class SampleProfErrorCategoryType : public std::error_category {
2326 const char *name() const LLVM_NOEXCEPT override { return "llvm.sampleprof"; }
2427 std::string message(int IE) const override {
1818 MultipleErrors
1919 };
2020
21 // FIXME: This class is only here to support the transition to llvm::Error. It
22 // will be removed once this transition is complete. Clients should prefer to
23 // deal with the Error value directly, rather than converting to error_code.
2124 class ErrorErrorCategory : public std::error_category {
2225 public:
2326 const char *name() const LLVM_NOEXCEPT override { return "Error"; }
1616 using namespace llvm;
1717
1818 namespace {
19 // FIXME: This class is only here to support the transition to llvm::Error. It
20 // will be removed once this transition is complete. Clients should prefer to
21 // deal with the Error value directly, rather than converting to error_code.
1922 class cxxdump_error_category : public std::error_category {
2023 public:
2124 const char *name() const LLVM_NOEXCEPT override { return "llvm.cxxdump"; }
1616 using namespace llvm;
1717
1818 namespace {
19 // FIXME: This class is only here to support the transition to llvm::Error. It
20 // will be removed once this transition is complete. Clients should prefer to
21 // deal with the Error value directly, rather than converting to error_code.
1922 class _readobj_error_category : public std::error_category {
2023 public:
2124 const char* name() const LLVM_NOEXCEPT override;
1212 using namespace llvm;
1313
1414 namespace {
15 // FIXME: This class is only here to support the transition to llvm::Error. It
16 // will be removed once this transition is complete. Clients should prefer to
17 // deal with the Error value directly, rather than converting to error_code.
1518 class _obj2yaml_error_category : public std::error_category {
1619 public:
1720 const char *name() const LLVM_NOEXCEPT override;