[lld] r210590 - Mark a few functions noexcept.

Rafael Espindola rafael.espindola at gmail.com
Tue Jun 10 14:26:18 PDT 2014


Author: rafael
Date: Tue Jun 10 16:26:18 2014
New Revision: 210590

URL: http://llvm.org/viewvc/llvm-project?rev=210590&view=rev
Log:
Mark a few functions noexcept.

Modified:
    lld/trunk/lib/Core/Error.cpp

Modified: lld/trunk/lib/Core/Error.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Core/Error.cpp?rev=210590&r1=210589&r2=210590&view=diff
==============================================================================
--- lld/trunk/lib/Core/Error.cpp (original)
+++ lld/trunk/lib/Core/Error.cpp Tue Jun 10 16:26:18 2014
@@ -20,7 +20,7 @@ using namespace lld;
 
 class _NativeReaderErrorCategory : public llvm::_do_message {
 public:
-  const char* name() const override {
+  const char* name() const LLVM_NOEXCEPT override {
     return "lld.native.reader";
   }
 
@@ -41,7 +41,8 @@ public:
                      "message defined.");
   }
 
-  llvm::error_condition default_error_condition(int ev) const override {
+  llvm::error_condition
+  default_error_condition(int ev) const LLVM_NOEXCEPT override {
     if (NativeReaderError(ev) == NativeReaderError::success)
       return llvm::error_condition();
     return llvm::errc::invalid_argument;
@@ -55,7 +56,7 @@ const llvm::error_category &lld::native_
 
 class _YamlReaderErrorCategory : public llvm::_do_message {
 public:
-  const char* name() const override {
+  const char* name() const LLVM_NOEXCEPT override {
     return "lld.yaml.reader";
   }
 
@@ -70,7 +71,8 @@ public:
                      "message defined.");
   }
 
-  llvm::error_condition default_error_condition(int ev) const override {
+  llvm::error_condition
+  default_error_condition(int ev) const LLVM_NOEXCEPT override {
     if (YamlReaderError(ev) == YamlReaderError::success)
       return llvm::error_condition();
     return llvm::errc::invalid_argument;
@@ -84,7 +86,9 @@ const llvm::error_category &lld::YamlRea
 
 class _LinkerScriptReaderErrorCategory : public llvm::_do_message {
 public:
-  const char *name() const override { return "lld.linker-script.reader"; }
+  const char *name() const LLVM_NOEXCEPT override {
+    return "lld.linker-script.reader";
+  }
 
   std::string message(int ev) const override {
     LinkerScriptReaderError e = LinkerScriptReaderError(ev);
@@ -97,7 +101,8 @@ public:
         "message defined.");
   }
 
-  llvm::error_condition default_error_condition(int ev) const override {
+  llvm::error_condition
+  default_error_condition(int ev) const LLVM_NOEXCEPT override {
     LinkerScriptReaderError e = LinkerScriptReaderError(ev);
     if (e == LinkerScriptReaderError::success)
       return llvm::error_condition();
@@ -112,7 +117,9 @@ const llvm::error_category &lld::LinkerS
 
 class _InputGraphErrorCategory : public llvm::_do_message {
 public:
-  const char *name() const override { return "lld.inputGraph.parse"; }
+  const char *name() const LLVM_NOEXCEPT override {
+    return "lld.inputGraph.parse";
+  }
 
   std::string message(int ev) const override {
     if (InputGraphError(ev) == InputGraphError::success)
@@ -121,7 +128,8 @@ public:
                      "message defined.");
   }
 
-  llvm::error_condition default_error_condition(int ev) const override {
+  llvm::error_condition
+  default_error_condition(int ev) const LLVM_NOEXCEPT override {
     if (InputGraphError(ev) == InputGraphError::success)
       return llvm::error_condition();
     return llvm::errc::invalid_argument;
@@ -135,7 +143,9 @@ const llvm::error_category &lld::InputGr
 
 class _ReaderErrorCategory : public llvm::_do_message {
 public:
-  const char *name() const override { return "lld.inputGraph.parse"; }
+  const char *name() const LLVM_NOEXCEPT override {
+    return "lld.inputGraph.parse";
+  }
 
   std::string message(int ev) const override {
     if (ReaderError(ev) == ReaderError::success)
@@ -147,7 +157,8 @@ public:
                      "message defined.");
   }
 
-  llvm::error_condition default_error_condition(int ev) const override {
+  llvm::error_condition
+  default_error_condition(int ev) const LLVM_NOEXCEPT override {
     if (ReaderError(ev) == ReaderError::success)
       return llvm::error_condition();
     return llvm::errc::invalid_argument;
@@ -170,7 +181,9 @@ namespace lld {
 /// other than error_code.
 class dynamic_error_category : public llvm::_do_message {
 public:
-  const char *name() const override { return "lld.dynamic_error"; }
+  const char *name() const LLVM_NOEXCEPT override {
+    return "lld.dynamic_error";
+  }
 
   std::string message(int ev) const override {
     assert(ev >= 0);





More information about the llvm-commits mailing list