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
This commit is contained in:
Peter Collingbourne 2016-05-24 20:13:46 +00:00
parent dfbdf80962
commit 4718f8b5f1
14 changed files with 42 additions and 0 deletions

View File

@ -6382,6 +6382,9 @@ std::error_code ModuleSummaryIndexBitcodeReader::initLazyStream(
}
namespace {
// FIXME: This class is only here to support the transition to llvm::Error. It
// will be removed once this transition is complete. Clients should prefer to
// deal with the Error value directly, rather than converting to error_code.
class BitcodeErrorCategoryType : public std::error_category {
const char *name() const LLVM_NOEXCEPT override {
return "llvm.bitcode";

View File

@ -5,6 +5,9 @@
using namespace llvm;
using namespace llvm::pdb;
// FIXME: This class is only here to support the transition to llvm::Error. It
// will be removed once this transition is complete. Clients should prefer to
// deal with the Error value directly, rather than converting to error_code.
class DIAErrorCategory : public std::error_category {
public:
const char *name() const LLVM_NOEXCEPT override { return "llvm.pdb.dia"; }

View File

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

View File

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

View File

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

View File

@ -34,6 +34,9 @@ enum RuntimeDyldErrorCode {
GenericRTDyldError = 1
};
// FIXME: This class is only here to support the transition to llvm::Error. It
// will be removed once this transition is complete. Clients should prefer to
// deal with the Error value directly, rather than converting to error_code.
class RuntimeDyldErrorCategory : public std::error_category {
public:
const char *name() const LLVM_NOEXCEPT override { return "runtimedyld"; }

View File

@ -19,6 +19,9 @@ using namespace llvm;
using namespace object;
namespace {
// FIXME: This class is only here to support the transition to llvm::Error. It
// will be removed once this transition is complete. Clients should prefer to
// deal with the Error value directly, rather than converting to error_code.
class _object_error_category : public std::error_category {
public:
const char* name() const LLVM_NOEXCEPT override;

View File

@ -556,6 +556,9 @@ std::string getCoverageMapErrString(coveragemap_error Err) {
llvm_unreachable("A value of coveragemap_error has no message.");
}
// FIXME: This class is only here to support the transition to llvm::Error. It
// will be removed once this transition is complete. Clients should prefer to
// deal with the Error value directly, rather than converting to error_code.
class CoverageMappingErrorCategoryType : public std::error_category {
const char *name() const LLVM_NOEXCEPT override { return "llvm.coveragemap"; }
std::string message(int IE) const override {

View File

@ -67,6 +67,9 @@ std::string getInstrProfErrString(instrprof_error Err) {
llvm_unreachable("A value of instrprof_error has no message.");
}
// FIXME: This class is only here to support the transition to llvm::Error. It
// will be removed once this transition is complete. Clients should prefer to
// deal with the Error value directly, rather than converting to error_code.
class InstrProfErrorCategoryType : public std::error_category {
const char *name() const LLVM_NOEXCEPT override { return "llvm.instrprof"; }
std::string message(int IE) const override {

View File

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

View File

@ -19,6 +19,9 @@ namespace {
MultipleErrors
};
// FIXME: This class is only here to support the transition to llvm::Error. It
// will be removed once this transition is complete. Clients should prefer to
// deal with the Error value directly, rather than converting to error_code.
class ErrorErrorCategory : public std::error_category {
public:
const char *name() const LLVM_NOEXCEPT override { return "Error"; }

View File

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

View File

@ -17,6 +17,9 @@
using namespace llvm;
namespace {
// FIXME: This class is only here to support the transition to llvm::Error. It
// will be removed once this transition is complete. Clients should prefer to
// deal with the Error value directly, rather than converting to error_code.
class _readobj_error_category : public std::error_category {
public:
const char* name() const LLVM_NOEXCEPT override;

View File

@ -13,6 +13,9 @@
using namespace llvm;
namespace {
// FIXME: This class is only here to support the transition to llvm::Error. It
// will be removed once this transition is complete. Clients should prefer to
// deal with the Error value directly, rather than converting to error_code.
class _obj2yaml_error_category : public std::error_category {
public:
const char *name() const LLVM_NOEXCEPT override;