summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2016-05-24 20:13:46 +0000
committerPeter Collingbourne <peter@pcc.me.uk>2016-05-24 20:13:46 +0000
commit4718f8b5f133e68a5925bddf0bad0ca3e8394428 (patch)
treed972c5a341d0d5e136da884c332dce0bfc7bec6f
parentdfbdf80962d61fa8b40accba9b6a074f72b5ec3f (diff)
downloadbcm5719-llvm-4718f8b5f133e68a5925bddf0bad0ca3e8394428.tar.gz
bcm5719-llvm-4718f8b5f133e68a5925bddf0bad0ca3e8394428.zip
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
-rw-r--r--llvm/lib/Bitcode/Reader/BitcodeReader.cpp3
-rw-r--r--llvm/lib/DebugInfo/PDB/DIA/DIAError.cpp3
-rw-r--r--llvm/lib/DebugInfo/PDB/GenericError.cpp3
-rw-r--r--llvm/lib/DebugInfo/PDB/Raw/RawError.cpp3
-rw-r--r--llvm/lib/ExecutionEngine/Orc/OrcError.cpp3
-rw-r--r--llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp3
-rw-r--r--llvm/lib/Object/Error.cpp3
-rw-r--r--llvm/lib/ProfileData/Coverage/CoverageMapping.cpp3
-rw-r--r--llvm/lib/ProfileData/InstrProf.cpp3
-rw-r--r--llvm/lib/ProfileData/SampleProf.cpp3
-rw-r--r--llvm/lib/Support/Error.cpp3
-rw-r--r--llvm/tools/llvm-cxxdump/Error.cpp3
-rw-r--r--llvm/tools/llvm-readobj/Error.cpp3
-rw-r--r--llvm/tools/obj2yaml/Error.cpp3
14 files changed, 42 insertions, 0 deletions
diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
index f3bd5508aa0..9796a10edb4 100644
--- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
+++ b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
@@ -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";
diff --git a/llvm/lib/DebugInfo/PDB/DIA/DIAError.cpp b/llvm/lib/DebugInfo/PDB/DIA/DIAError.cpp
index 647446be577..1d72a92b514 100644
--- a/llvm/lib/DebugInfo/PDB/DIA/DIAError.cpp
+++ b/llvm/lib/DebugInfo/PDB/DIA/DIAError.cpp
@@ -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"; }
diff --git a/llvm/lib/DebugInfo/PDB/GenericError.cpp b/llvm/lib/DebugInfo/PDB/GenericError.cpp
index 66b3a7a7fee..34e17999802 100644
--- a/llvm/lib/DebugInfo/PDB/GenericError.cpp
+++ b/llvm/lib/DebugInfo/PDB/GenericError.cpp
@@ -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"; }
diff --git a/llvm/lib/DebugInfo/PDB/Raw/RawError.cpp b/llvm/lib/DebugInfo/PDB/Raw/RawError.cpp
index 00eb6e5b24c..037a1aab4b1 100644
--- a/llvm/lib/DebugInfo/PDB/Raw/RawError.cpp
+++ b/llvm/lib/DebugInfo/PDB/Raw/RawError.cpp
@@ -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"; }
diff --git a/llvm/lib/ExecutionEngine/Orc/OrcError.cpp b/llvm/lib/ExecutionEngine/Orc/OrcError.cpp
index 58889cc7bc1..22f1303f433 100644
--- a/llvm/lib/ExecutionEngine/Orc/OrcError.cpp
+++ b/llvm/lib/ExecutionEngine/Orc/OrcError.cpp
@@ -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"; }
diff --git a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
index a14a6bbd1e5..2df35da7bf1 100644
--- a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
+++ b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
@@ -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"; }
diff --git a/llvm/lib/Object/Error.cpp b/llvm/lib/Object/Error.cpp
index 8eab793c27b..2357526b789 100644
--- a/llvm/lib/Object/Error.cpp
+++ b/llvm/lib/Object/Error.cpp
@@ -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;
diff --git a/llvm/lib/ProfileData/Coverage/CoverageMapping.cpp b/llvm/lib/ProfileData/Coverage/CoverageMapping.cpp
index 550e5494999..2d833204c91 100644
--- a/llvm/lib/ProfileData/Coverage/CoverageMapping.cpp
+++ b/llvm/lib/ProfileData/Coverage/CoverageMapping.cpp
@@ -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 {
diff --git a/llvm/lib/ProfileData/InstrProf.cpp b/llvm/lib/ProfileData/InstrProf.cpp
index 7225cbdbc44..69bb9bb37b3 100644
--- a/llvm/lib/ProfileData/InstrProf.cpp
+++ b/llvm/lib/ProfileData/InstrProf.cpp
@@ -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 {
diff --git a/llvm/lib/ProfileData/SampleProf.cpp b/llvm/lib/ProfileData/SampleProf.cpp
index 45e1679d925..cb0246113d8 100644
--- a/llvm/lib/ProfileData/SampleProf.cpp
+++ b/llvm/lib/ProfileData/SampleProf.cpp
@@ -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 {
diff --git a/llvm/lib/Support/Error.cpp b/llvm/lib/Support/Error.cpp
index 9007e694ec7..564b763ff32 100644
--- a/llvm/lib/Support/Error.cpp
+++ b/llvm/lib/Support/Error.cpp
@@ -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"; }
diff --git a/llvm/tools/llvm-cxxdump/Error.cpp b/llvm/tools/llvm-cxxdump/Error.cpp
index 16fed96e483..ff9f0f57906 100644
--- a/llvm/tools/llvm-cxxdump/Error.cpp
+++ b/llvm/tools/llvm-cxxdump/Error.cpp
@@ -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"; }
diff --git a/llvm/tools/llvm-readobj/Error.cpp b/llvm/tools/llvm-readobj/Error.cpp
index 7e6f780c5d1..492eb330949 100644
--- a/llvm/tools/llvm-readobj/Error.cpp
+++ b/llvm/tools/llvm-readobj/Error.cpp
@@ -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;
diff --git a/llvm/tools/obj2yaml/Error.cpp b/llvm/tools/obj2yaml/Error.cpp
index 9c2aeefef2f..9d1af680a73 100644
--- a/llvm/tools/obj2yaml/Error.cpp
+++ b/llvm/tools/obj2yaml/Error.cpp
@@ -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;
OpenPOWER on IntegriCloud