[llvm] r203998 - Support: Make error_category's constructor public
Justin Bogner
mail at justinbogner.com
Fri Mar 14 21:06:00 PDT 2014
Author: bogner
Date: Fri Mar 14 23:05:59 2014
New Revision: 203998
URL: http://llvm.org/viewvc/llvm-project?rev=203998&view=rev
Log:
Support: Make error_category's constructor public
Since our error_category is based on the std one, we should have the
same visibility for the constructor. This also allows us to avoid
using the _do_message implementation detail in our own categories.
Modified:
llvm/trunk/include/llvm/Support/system_error.h
llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp
llvm/trunk/lib/Object/Error.cpp
llvm/trunk/tools/llvm-readobj/Error.cpp
Modified: llvm/trunk/include/llvm/Support/system_error.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/system_error.h?rev=203998&r1=203997&r2=203998&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/system_error.h (original)
+++ llvm/trunk/include/llvm/Support/system_error.h Fri Mar 14 23:05:59 2014
@@ -628,8 +628,8 @@ class error_category
public:
virtual ~error_category();
-private:
error_category();
+private:
error_category(const error_category&) LLVM_DELETED_FUNCTION;
error_category& operator=(const error_category&) LLVM_DELETED_FUNCTION;
Modified: llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp?rev=203998&r1=203997&r2=203998&view=diff
==============================================================================
--- llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp (original)
+++ llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp Fri Mar 14 23:05:59 2014
@@ -3257,7 +3257,7 @@ error_code BitcodeReader::InitLazyStream
}
namespace {
-class BitcodeErrorCategoryType : public _do_message {
+class BitcodeErrorCategoryType : public error_category {
const char *name() const override {
return "llvm.bitcode";
}
Modified: llvm/trunk/lib/Object/Error.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Object/Error.cpp?rev=203998&r1=203997&r2=203998&view=diff
==============================================================================
--- llvm/trunk/lib/Object/Error.cpp (original)
+++ llvm/trunk/lib/Object/Error.cpp Fri Mar 14 23:05:59 2014
@@ -18,11 +18,11 @@ using namespace llvm;
using namespace object;
namespace {
-class _object_error_category : public _do_message {
+class _object_error_category : public error_category {
public:
- virtual const char* name() const;
- virtual std::string message(int ev) const;
- virtual error_condition default_error_condition(int ev) const;
+ const char* name() const override;
+ std::string message(int ev) const override;
+ error_condition default_error_condition(int ev) const override;
};
}
Modified: llvm/trunk/tools/llvm-readobj/Error.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-readobj/Error.cpp?rev=203998&r1=203997&r2=203998&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-readobj/Error.cpp (original)
+++ llvm/trunk/tools/llvm-readobj/Error.cpp Fri Mar 14 23:05:59 2014
@@ -17,7 +17,7 @@
using namespace llvm;
namespace {
-class _readobj_error_category : public _do_message {
+class _readobj_error_category : public error_category {
public:
const char* name() const override;
std::string message(int ev) const override;
More information about the llvm-commits
mailing list