[PATCH] Rename lld:*_error::_ -> lld:*_error::ErrorCode.

Rui Ueyama ruiu at google.com
Mon Oct 7 14:39:44 PDT 2013


Hi shankarke,

Rename lld:*_error::_ -> lld:*_error::ErrorCode.

http://llvm-reviews.chandlerc.com/D1851

Files:
  include/lld/Core/Error.h

Index: include/lld/Core/Error.h
===================================================================
--- include/lld/Core/Error.h
+++ include/lld/Core/Error.h
@@ -21,19 +21,19 @@
 const llvm::error_category &native_reader_category();
 
 struct native_reader_error {
-  enum _ {
+  enum ErrorCode {
     success = 0,
     unknown_file_format,
     file_too_short,
     file_malformed,
     unknown_chunk_type,
     memory_error,
   };
-  _ v_;
+  ErrorCode v_;
 
-  native_reader_error(_ v) : v_(v) {}
-  explicit native_reader_error(int v) : v_(_(v)) {}
-  operator int() const {return v_;}
+  native_reader_error(ErrorCode v) : v_(v) {}
+  explicit native_reader_error(int v) : v_(ErrorCode(v)) {}
+  operator int() const { return v_; }
 };
 
 inline llvm::error_code make_error_code(native_reader_error e) {
@@ -43,16 +43,16 @@
 const llvm::error_category &yaml_reader_category();
 
 struct yaml_reader_error {
-  enum _ {
+  enum ErrorCode {
     success = 0,
     unknown_keyword,
     illegal_value
   };
-  _ v_;
+  ErrorCode v_;
 
-  yaml_reader_error(_ v) : v_(v) {}
-  explicit yaml_reader_error(int v) : v_(_(v)) {}
-  operator int() const {return v_;}
+  yaml_reader_error(ErrorCode v) : v_(v) {}
+  explicit yaml_reader_error(int v) : v_(ErrorCode(v)) {}
+  operator int() const { return v_; }
 };
 
 inline llvm::error_code make_error_code(yaml_reader_error e) {
@@ -74,16 +74,16 @@
 const llvm::error_category &input_graph_error_category();
 
 struct input_graph_error {
-  enum _ {
+  enum ErrorCode {
     success = 0,
     failure = 1,
     no_more_elements,
     no_more_files,
   };
-  _ v_;
+  ErrorCode v_;
 
-  input_graph_error(_ v) : v_(v) {}
-  explicit input_graph_error(int v) : v_(_(v)) {}
+  input_graph_error(ErrorCode v) : v_(v) {}
+  explicit input_graph_error(int v) : v_(ErrorCode(v)) {}
   operator int() const { return v_; }
 };
 
@@ -95,19 +95,20 @@
 
 namespace llvm {
 
-template <> struct is_error_code_enum<lld::native_reader_error> : true_type { };
+template <> struct is_error_code_enum<lld::native_reader_error> : true_type {};
 template <>
-struct is_error_code_enum<lld::native_reader_error::_> : true_type { };
+struct is_error_code_enum<lld::native_reader_error::ErrorCode> : true_type {};
 
-template <> struct is_error_code_enum<lld::yaml_reader_error> : true_type { };
+template <> struct is_error_code_enum<lld::yaml_reader_error> : true_type {};
 template <>
-struct is_error_code_enum<lld::yaml_reader_error::_> : true_type { };
+struct is_error_code_enum<lld::yaml_reader_error::ErrorCode> : true_type {};
 
 template <>
-struct is_error_code_enum<lld::linker_script_reader_error> : true_type { };
+struct is_error_code_enum<lld::linker_script_reader_error> : true_type {};
 
 template <> struct is_error_code_enum<lld::input_graph_error> : true_type {};
-template <> struct is_error_code_enum<lld::input_graph_error::_> : true_type {};
+template <>
+struct is_error_code_enum<lld::input_graph_error::ErrorCode> : true_type {};
 } // end namespace llvm
 
 #endif
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D1851.1.patch
Type: text/x-patch
Size: 3017 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131007/f3330df0/attachment.bin>


More information about the llvm-commits mailing list