aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Object/Error.cpp
diff options
context:
space:
mode:
authorStephen Hines <srhines@google.com>2014-12-04 19:51:48 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-12-04 19:51:48 +0000
commita21bbdfad461e957fa42ac9d6860ddc9de2da3e9 (patch)
tree8d32ff2094b47e15a8def30d62fd7dee6e009de3 /lib/Object/Error.cpp
parent6b8c6a5088c221af2b25065b8b6b8b0fec8a116f (diff)
parent876d6995443e99d13696f3941c3a789a4daa7c7a (diff)
downloadexternal_llvm-a21bbdfad461e957fa42ac9d6860ddc9de2da3e9.zip
external_llvm-a21bbdfad461e957fa42ac9d6860ddc9de2da3e9.tar.gz
external_llvm-a21bbdfad461e957fa42ac9d6860ddc9de2da3e9.tar.bz2
am 876d6995: Merge "Update aosp/master LLVM for rebase to r222494."
* commit '876d6995443e99d13696f3941c3a789a4daa7c7a': Update aosp/master LLVM for rebase to r222494.
Diffstat (limited to 'lib/Object/Error.cpp')
-rw-r--r--lib/Object/Error.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/Object/Error.cpp b/lib/Object/Error.cpp
index 9d25269..d2daab7 100644
--- a/lib/Object/Error.cpp
+++ b/lib/Object/Error.cpp
@@ -13,6 +13,7 @@
#include "llvm/Object/Error.h"
#include "llvm/Support/ErrorHandling.h"
+#include "llvm/Support/ManagedStatic.h"
using namespace llvm;
using namespace object;
@@ -25,7 +26,7 @@ public:
};
}
-const char *_object_error_category::name() const {
+const char *_object_error_category::name() const LLVM_NOEXCEPT {
return "llvm.object";
}
@@ -41,12 +42,15 @@ std::string _object_error_category::message(int EV) const {
return "Invalid data was encountered while parsing the file";
case object_error::unexpected_eof:
return "The end of the file was unexpectedly encountered";
+ case object_error::bitcode_section_not_found:
+ return "Bitcode section not found in object file";
}
llvm_unreachable("An enumerator of object_error does not have a message "
"defined.");
}
+static ManagedStatic<_object_error_category> error_category;
+
const std::error_category &object::object_category() {
- static _object_error_category o;
- return o;
+ return *error_category;
}