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

Rui Ueyama ruiu at google.com
Mon Oct 7 14:58:51 PDT 2013


Author: ruiu
Date: Mon Oct  7 16:58:51 2013
New Revision: 192138

URL: http://llvm.org/viewvc/llvm-project?rev=192138&view=rev
Log:
Rename lld:*_error::_ -> lld:*_error::ErrorCode.

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

Reviewers: shankarke

CC: llvm-commits

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

Modified:
    lld/trunk/include/lld/Core/Error.h

Modified: lld/trunk/include/lld/Core/Error.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/include/lld/Core/Error.h?rev=192138&r1=192137&r2=192138&view=diff
==============================================================================
--- lld/trunk/include/lld/Core/Error.h (original)
+++ lld/trunk/include/lld/Core/Error.h Mon Oct  7 16:58:51 2013
@@ -21,7 +21,7 @@ namespace lld {
 const llvm::error_category &native_reader_category();
 
 struct native_reader_error {
-  enum _ {
+  enum ErrorCode {
     success = 0,
     unknown_file_format,
     file_too_short,
@@ -29,11 +29,11 @@ struct native_reader_error {
     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 @@ inline llvm::error_code make_error_code(
 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 @@ inline llvm::error_code make_error_code(
 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 @@ inline llvm::error_code make_error_code(
 
 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





More information about the llvm-commits mailing list