Support: Make error_category's constructor public
authorJustin Bogner <mail@justinbogner.com>
Sat, 15 Mar 2014 04:05:59 +0000 (04:05 +0000)
committerJustin Bogner <mail@justinbogner.com>
Sat, 15 Mar 2014 04:05:59 +0000 (04:05 +0000)
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203998 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Support/system_error.h
lib/Bitcode/Reader/BitcodeReader.cpp
lib/Object/Error.cpp
tools/llvm-readobj/Error.cpp

index 046132f8598407bd3975aa048b96f1ca5d0ae99a..4ca4b069748b1d4916311d7c646e1c6888604a5d 100644 (file)
@@ -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;
 
index 19528c8e67bf70dab3eb047f20a6e5ac6f8d2b71..ab0a1249f2d39ead06acf00c106a600651b6fa90 100644 (file)
@@ -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";
   }
index 47ce38c88839483313f928aaff2a4afe4d443481..8e508696cfb819f102317978c87f51bb7d192e90 100644 (file)
@@ -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;
 };
 }
 
index 1aed92bc8dddb7259879e50f828b4468f328009b..83ed6a7dfc000718ca9145ea028d4df2869a664b 100644 (file)
@@ -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;