diff options
author | Rui Ueyama <ruiu@google.com> | 2013-10-09 00:57:22 +0000 |
---|---|---|
committer | Rui Ueyama <ruiu@google.com> | 2013-10-09 00:57:22 +0000 |
commit | c6015f6476530d25dc8fbe7cb5fa4668312a69ac (patch) | |
tree | ebb668e4052c5dccd2bee1449e7b54669a64c2d5 /lld/lib/Core/Error.cpp | |
parent | 1c1b443997f22b63164effd41fbfb7f7c34c8a51 (diff) | |
download | bcm5719-llvm-c6015f6476530d25dc8fbe7cb5fa4668312a69ac.tar.gz bcm5719-llvm-c6015f6476530d25dc8fbe7cb5fa4668312a69ac.zip |
Update error classes from all lowercase to camel case.
llvm-svn: 192261
Diffstat (limited to 'lld/lib/Core/Error.cpp')
-rw-r--r-- | lld/lib/Core/Error.cpp | 66 |
1 files changed, 33 insertions, 33 deletions
diff --git a/lld/lib/Core/Error.cpp b/lld/lib/Core/Error.cpp index 60e49645e34..34c785dc70e 100644 --- a/lld/lib/Core/Error.cpp +++ b/lld/lib/Core/Error.cpp @@ -13,117 +13,117 @@ using namespace lld; -class _native_reader_error_category : public llvm::_do_message { +class _NativeReaderErrorCategory : public llvm::_do_message { public: virtual const char* name() const { return "lld.native.reader"; } virtual std::string message(int ev) const { - if (native_reader_error(ev) == native_reader_error::success) + if (NativeReaderError(ev) == NativeReaderError::success) return "Success"; - if (native_reader_error(ev) == native_reader_error::unknown_file_format) + if (NativeReaderError(ev) == NativeReaderError::unknown_file_format) return "Unknown file format"; - if (native_reader_error(ev) == native_reader_error::file_too_short) + if (NativeReaderError(ev) == NativeReaderError::file_too_short) return "file truncated"; - if (native_reader_error(ev) == native_reader_error::file_malformed) + if (NativeReaderError(ev) == NativeReaderError::file_malformed) return "file malformed"; - if (native_reader_error(ev) == native_reader_error::memory_error) + if (NativeReaderError(ev) == NativeReaderError::memory_error) return "out of memory"; - if (native_reader_error(ev) == native_reader_error::unknown_chunk_type) + if (NativeReaderError(ev) == NativeReaderError::unknown_chunk_type) return "unknown chunk type"; - llvm_unreachable("An enumerator of native_reader_error does not have a " + llvm_unreachable("An enumerator of NativeReaderError does not have a " "message defined."); } virtual llvm::error_condition default_error_condition(int ev) const { - if (native_reader_error(ev) == native_reader_error::success) + if (NativeReaderError(ev) == NativeReaderError::success) return llvm::errc::success; return llvm::errc::invalid_argument; } }; const llvm::error_category &lld::native_reader_category() { - static _native_reader_error_category o; + static _NativeReaderErrorCategory o; return o; } -class _yaml_reader_error_category : public llvm::_do_message { +class _YamlReaderErrorCategory : public llvm::_do_message { public: virtual const char* name() const { return "lld.yaml.reader"; } virtual std::string message(int ev) const { - if (yaml_reader_error(ev) == yaml_reader_error::success) + if (YamlReaderError(ev) == YamlReaderError::success) return "Success"; - if (yaml_reader_error(ev) == yaml_reader_error::unknown_keyword) + if (YamlReaderError(ev) == YamlReaderError::unknown_keyword) return "Unknown keyword found in yaml file"; - if (yaml_reader_error(ev) == yaml_reader_error::illegal_value) + if (YamlReaderError(ev) == YamlReaderError::illegal_value) return "Bad value found in yaml file"; - llvm_unreachable("An enumerator of yaml_reader_error does not have a " + llvm_unreachable("An enumerator of YamlReaderError does not have a " "message defined."); } virtual llvm::error_condition default_error_condition(int ev) const { - if (yaml_reader_error(ev) == yaml_reader_error::success) + if (YamlReaderError(ev) == YamlReaderError::success) return llvm::errc::success; return llvm::errc::invalid_argument; } }; -const llvm::error_category &lld::yaml_reader_category() { - static _yaml_reader_error_category o; +const llvm::error_category &lld::YamlReaderCategory() { + static _YamlReaderErrorCategory o; return o; } -class _linker_script_reader_error_category : public llvm::_do_message { +class _LinkerScriptReaderErrorCategory : public llvm::_do_message { public: virtual const char *name() const { return "lld.linker-script.reader"; } virtual std::string message(int ev) const { - linker_script_reader_error e = linker_script_reader_error(ev); - if (e == linker_script_reader_error::success) + LinkerScriptReaderError e = LinkerScriptReaderError(ev); + if (e == LinkerScriptReaderError::success) return "Success"; - if (e == linker_script_reader_error::parse_error) + if (e == LinkerScriptReaderError::parse_error) return "Error parsing linker script"; llvm_unreachable( - "An enumerator of linker_script_reader_error does not have a " + "An enumerator of LinkerScriptReaderError does not have a " "message defined."); } virtual llvm::error_condition default_error_condition(int ev) const { - linker_script_reader_error e = linker_script_reader_error(ev); - if (e == linker_script_reader_error::success) + LinkerScriptReaderError e = LinkerScriptReaderError(ev); + if (e == LinkerScriptReaderError::success) return llvm::errc::success; return llvm::errc::invalid_argument; } }; -const llvm::error_category &lld::linker_script_reader_category() { - static _linker_script_reader_error_category o; +const llvm::error_category &lld::LinkerScriptReaderCategory() { + static _LinkerScriptReaderErrorCategory o; return o; } -class _input_graph_error_category : public llvm::_do_message { +class _InputGraphErrorCategory : public llvm::_do_message { public: virtual const char *name() const { return "lld.inputGraph.parse"; } virtual std::string message(int ev) const { - if (input_graph_error(ev) == input_graph_error::success) + if (InputGraphError(ev) == InputGraphError::success) return "Success"; - llvm_unreachable("An enumerator of input_graph_error does not have a " + llvm_unreachable("An enumerator of InputGraphError does not have a " "message defined."); } virtual llvm::error_condition default_error_condition(int ev) const { - if (input_graph_error(ev) == input_graph_error::success) + if (InputGraphError(ev) == InputGraphError::success) return llvm::errc::success; return llvm::errc::invalid_argument; } }; -const llvm::error_category &lld::input_graph_error_category() { - static _input_graph_error_category i; +const llvm::error_category &lld::InputGraphErrorCategory() { + static _InputGraphErrorCategory i; return i; } |