[llvm] r270604 - Add FIXMEs to all derived classes of std::error_category.
Peter Collingbourne via llvm-commits
llvm-commits at lists.llvm.org
Tue May 24 13:13:48 PDT 2016
Author: pcc
Date: Tue May 24 15:13:46 2016
New Revision: 270604
URL: http://llvm.org/viewvc/llvm-project?rev=270604&view=rev
Log:
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
Modified:
llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp
llvm/trunk/lib/DebugInfo/PDB/DIA/DIAError.cpp
llvm/trunk/lib/DebugInfo/PDB/GenericError.cpp
llvm/trunk/lib/DebugInfo/PDB/Raw/RawError.cpp
llvm/trunk/lib/ExecutionEngine/Orc/OrcError.cpp
llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
llvm/trunk/lib/Object/Error.cpp
llvm/trunk/lib/ProfileData/Coverage/CoverageMapping.cpp
llvm/trunk/lib/ProfileData/InstrProf.cpp
llvm/trunk/lib/ProfileData/SampleProf.cpp
llvm/trunk/lib/Support/Error.cpp
llvm/trunk/tools/llvm-cxxdump/Error.cpp
llvm/trunk/tools/llvm-readobj/Error.cpp
llvm/trunk/tools/obj2yaml/Error.cpp
Modified: llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp?rev=270604&r1=270603&r2=270604&view=diff
==============================================================================
--- llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp (original)
+++ llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp Tue May 24 15:13:46 2016
@@ -6382,6 +6382,9 @@ std::error_code ModuleSummaryIndexBitcod
}
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";
Modified: llvm/trunk/lib/DebugInfo/PDB/DIA/DIAError.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/PDB/DIA/DIAError.cpp?rev=270604&r1=270603&r2=270604&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/PDB/DIA/DIAError.cpp (original)
+++ llvm/trunk/lib/DebugInfo/PDB/DIA/DIAError.cpp Tue May 24 15:13:46 2016
@@ -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"; }
Modified: llvm/trunk/lib/DebugInfo/PDB/GenericError.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/PDB/GenericError.cpp?rev=270604&r1=270603&r2=270604&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/PDB/GenericError.cpp (original)
+++ llvm/trunk/lib/DebugInfo/PDB/GenericError.cpp Tue May 24 15:13:46 2016
@@ -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"; }
Modified: llvm/trunk/lib/DebugInfo/PDB/Raw/RawError.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/PDB/Raw/RawError.cpp?rev=270604&r1=270603&r2=270604&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/PDB/Raw/RawError.cpp (original)
+++ llvm/trunk/lib/DebugInfo/PDB/Raw/RawError.cpp Tue May 24 15:13:46 2016
@@ -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"; }
Modified: llvm/trunk/lib/ExecutionEngine/Orc/OrcError.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/Orc/OrcError.cpp?rev=270604&r1=270603&r2=270604&view=diff
==============================================================================
--- llvm/trunk/lib/ExecutionEngine/Orc/OrcError.cpp (original)
+++ llvm/trunk/lib/ExecutionEngine/Orc/OrcError.cpp Tue May 24 15:13:46 2016
@@ -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"; }
Modified: llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp?rev=270604&r1=270603&r2=270604&view=diff
==============================================================================
--- llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp (original)
+++ llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp Tue May 24 15:13:46 2016
@@ -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"; }
Modified: llvm/trunk/lib/Object/Error.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Object/Error.cpp?rev=270604&r1=270603&r2=270604&view=diff
==============================================================================
--- llvm/trunk/lib/Object/Error.cpp (original)
+++ llvm/trunk/lib/Object/Error.cpp Tue May 24 15:13:46 2016
@@ -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;
Modified: llvm/trunk/lib/ProfileData/Coverage/CoverageMapping.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ProfileData/Coverage/CoverageMapping.cpp?rev=270604&r1=270603&r2=270604&view=diff
==============================================================================
--- llvm/trunk/lib/ProfileData/Coverage/CoverageMapping.cpp (original)
+++ llvm/trunk/lib/ProfileData/Coverage/CoverageMapping.cpp Tue May 24 15:13:46 2016
@@ -556,6 +556,9 @@ std::string getCoverageMapErrString(cove
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 {
Modified: llvm/trunk/lib/ProfileData/InstrProf.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ProfileData/InstrProf.cpp?rev=270604&r1=270603&r2=270604&view=diff
==============================================================================
--- llvm/trunk/lib/ProfileData/InstrProf.cpp (original)
+++ llvm/trunk/lib/ProfileData/InstrProf.cpp Tue May 24 15:13:46 2016
@@ -67,6 +67,9 @@ std::string getInstrProfErrString(instrp
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 {
Modified: llvm/trunk/lib/ProfileData/SampleProf.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ProfileData/SampleProf.cpp?rev=270604&r1=270603&r2=270604&view=diff
==============================================================================
--- llvm/trunk/lib/ProfileData/SampleProf.cpp (original)
+++ llvm/trunk/lib/ProfileData/SampleProf.cpp Tue May 24 15:13:46 2016
@@ -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 {
Modified: llvm/trunk/lib/Support/Error.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Error.cpp?rev=270604&r1=270603&r2=270604&view=diff
==============================================================================
--- llvm/trunk/lib/Support/Error.cpp (original)
+++ llvm/trunk/lib/Support/Error.cpp Tue May 24 15:13:46 2016
@@ -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"; }
Modified: llvm/trunk/tools/llvm-cxxdump/Error.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-cxxdump/Error.cpp?rev=270604&r1=270603&r2=270604&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-cxxdump/Error.cpp (original)
+++ llvm/trunk/tools/llvm-cxxdump/Error.cpp Tue May 24 15:13:46 2016
@@ -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"; }
Modified: llvm/trunk/tools/llvm-readobj/Error.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-readobj/Error.cpp?rev=270604&r1=270603&r2=270604&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-readobj/Error.cpp (original)
+++ llvm/trunk/tools/llvm-readobj/Error.cpp Tue May 24 15:13:46 2016
@@ -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;
Modified: llvm/trunk/tools/obj2yaml/Error.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/obj2yaml/Error.cpp?rev=270604&r1=270603&r2=270604&view=diff
==============================================================================
--- llvm/trunk/tools/obj2yaml/Error.cpp (original)
+++ llvm/trunk/tools/obj2yaml/Error.cpp Tue May 24 15:13:46 2016
@@ -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;
More information about the llvm-commits
mailing list