Skip to content

Commit 4718f8b

Browse files
committed
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 llvm-svn: 270604
1 parent dfbdf80 commit 4718f8b

File tree

14 files changed

+42
-0
lines changed

14 files changed

+42
-0
lines changed

llvm/lib/Bitcode/Reader/BitcodeReader.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -6382,6 +6382,9 @@ std::error_code ModuleSummaryIndexBitcodeReader::initLazyStream(
63826382
}
63836383

63846384
namespace {
6385+
// FIXME: This class is only here to support the transition to llvm::Error. It
6386+
// will be removed once this transition is complete. Clients should prefer to
6387+
// deal with the Error value directly, rather than converting to error_code.
63856388
class BitcodeErrorCategoryType : public std::error_category {
63866389
const char *name() const LLVM_NOEXCEPT override {
63876390
return "llvm.bitcode";

llvm/lib/DebugInfo/PDB/DIA/DIAError.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
using namespace llvm;
66
using namespace llvm::pdb;
77

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 DIAErrorCategory : public std::error_category {
912
public:
1013
const char *name() const LLVM_NOEXCEPT override { return "llvm.pdb.dia"; }

llvm/lib/DebugInfo/PDB/GenericError.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ using namespace llvm;
1515
using namespace llvm::pdb;
1616

1717
namespace {
18+
// FIXME: This class is only here to support the transition to llvm::Error. It
19+
// will be removed once this transition is complete. Clients should prefer to
20+
// deal with the Error value directly, rather than converting to error_code.
1821
class GenericErrorCategory : public std::error_category {
1922
public:
2023
const char *name() const LLVM_NOEXCEPT override { return "llvm.pdb"; }

llvm/lib/DebugInfo/PDB/Raw/RawError.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ using namespace llvm;
66
using namespace llvm::pdb;
77

88
namespace {
9+
// FIXME: This class is only here to support the transition to llvm::Error. It
10+
// will be removed once this transition is complete. Clients should prefer to
11+
// deal with the Error value directly, rather than converting to error_code.
912
class RawErrorCategory : public std::error_category {
1013
public:
1114
const char *name() const LLVM_NOEXCEPT override { return "llvm.pdb.raw"; }

llvm/lib/ExecutionEngine/Orc/OrcError.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ using namespace llvm::orc;
2020

2121
namespace {
2222

23+
// FIXME: This class is only here to support the transition to llvm::Error. It
24+
// will be removed once this transition is complete. Clients should prefer to
25+
// deal with the Error value directly, rather than converting to error_code.
2326
class OrcErrorCategory : public std::error_category {
2427
public:
2528
const char *name() const LLVM_NOEXCEPT override { return "orc"; }

llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ enum RuntimeDyldErrorCode {
3434
GenericRTDyldError = 1
3535
};
3636

37+
// FIXME: This class is only here to support the transition to llvm::Error. It
38+
// will be removed once this transition is complete. Clients should prefer to
39+
// deal with the Error value directly, rather than converting to error_code.
3740
class RuntimeDyldErrorCategory : public std::error_category {
3841
public:
3942
const char *name() const LLVM_NOEXCEPT override { return "runtimedyld"; }

llvm/lib/Object/Error.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ using namespace llvm;
1919
using namespace object;
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 _object_error_category : public std::error_category {
2326
public:
2427
const char* name() const LLVM_NOEXCEPT override;

llvm/lib/ProfileData/Coverage/CoverageMapping.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -556,6 +556,9 @@ std::string getCoverageMapErrString(coveragemap_error Err) {
556556
llvm_unreachable("A value of coveragemap_error has no message.");
557557
}
558558

559+
// FIXME: This class is only here to support the transition to llvm::Error. It
560+
// will be removed once this transition is complete. Clients should prefer to
561+
// deal with the Error value directly, rather than converting to error_code.
559562
class CoverageMappingErrorCategoryType : public std::error_category {
560563
const char *name() const LLVM_NOEXCEPT override { return "llvm.coveragemap"; }
561564
std::string message(int IE) const override {

llvm/lib/ProfileData/InstrProf.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ std::string getInstrProfErrString(instrprof_error Err) {
6767
llvm_unreachable("A value of instrprof_error has no message.");
6868
}
6969

70+
// FIXME: This class is only here to support the transition to llvm::Error. It
71+
// will be removed once this transition is complete. Clients should prefer to
72+
// deal with the Error value directly, rather than converting to error_code.
7073
class InstrProfErrorCategoryType : public std::error_category {
7174
const char *name() const LLVM_NOEXCEPT override { return "llvm.instrprof"; }
7275
std::string message(int IE) const override {

llvm/lib/ProfileData/SampleProf.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ using namespace llvm::sampleprof;
2020
using namespace llvm;
2121

2222
namespace {
23+
// FIXME: This class is only here to support the transition to llvm::Error. It
24+
// will be removed once this transition is complete. Clients should prefer to
25+
// deal with the Error value directly, rather than converting to error_code.
2326
class SampleProfErrorCategoryType : public std::error_category {
2427
const char *name() const LLVM_NOEXCEPT override { return "llvm.sampleprof"; }
2528
std::string message(int IE) const override {

llvm/lib/Support/Error.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ namespace {
1919
MultipleErrors
2020
};
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 ErrorErrorCategory : public std::error_category {
2326
public:
2427
const char *name() const LLVM_NOEXCEPT override { return "Error"; }

llvm/tools/llvm-cxxdump/Error.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717
using namespace llvm;
1818

1919
namespace {
20+
// FIXME: This class is only here to support the transition to llvm::Error. It
21+
// will be removed once this transition is complete. Clients should prefer to
22+
// deal with the Error value directly, rather than converting to error_code.
2023
class cxxdump_error_category : public std::error_category {
2124
public:
2225
const char *name() const LLVM_NOEXCEPT override { return "llvm.cxxdump"; }

llvm/tools/llvm-readobj/Error.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717
using namespace llvm;
1818

1919
namespace {
20+
// FIXME: This class is only here to support the transition to llvm::Error. It
21+
// will be removed once this transition is complete. Clients should prefer to
22+
// deal with the Error value directly, rather than converting to error_code.
2023
class _readobj_error_category : public std::error_category {
2124
public:
2225
const char* name() const LLVM_NOEXCEPT override;

llvm/tools/obj2yaml/Error.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
using namespace llvm;
1414

1515
namespace {
16+
// FIXME: This class is only here to support the transition to llvm::Error. It
17+
// will be removed once this transition is complete. Clients should prefer to
18+
// deal with the Error value directly, rather than converting to error_code.
1619
class _obj2yaml_error_category : public std::error_category {
1720
public:
1821
const char *name() const LLVM_NOEXCEPT override;

0 commit comments

Comments
 (0)