summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Object
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2014-06-03 05:26:12 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2014-06-03 05:26:12 +0000
commite00fec8fe470a800423688b448434f3b2340d038 (patch)
tree1c664e60cef7d410e1fe49564fb29787d920e40e /llvm/lib/Object
parent92512e89a2a653eb5b9fb5485c8681f225ebaf1e (diff)
downloadbcm5719-llvm-e00fec8fe470a800423688b448434f3b2340d038.tar.gz
bcm5719-llvm-e00fec8fe470a800423688b448434f3b2340d038.zip
Use an enum class.
llvm-svn: 210078
Diffstat (limited to 'llvm/lib/Object')
-rw-r--r--llvm/lib/Object/Error.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Object/Error.cpp b/llvm/lib/Object/Error.cpp
index 6f72849ae27..f1d0f0184d2 100644
--- a/llvm/lib/Object/Error.cpp
+++ b/llvm/lib/Object/Error.cpp
@@ -30,8 +30,8 @@ const char *_object_error_category::name() const {
return "llvm.object";
}
-std::string _object_error_category::message(int ev) const {
- object_error::Impl E = static_cast<object_error::Impl>(ev);
+std::string _object_error_category::message(int EV) const {
+ object_error E = static_cast<object_error>(EV);
switch (E) {
case object_error::success: return "Success";
case object_error::arch_not_found:
@@ -47,8 +47,8 @@ std::string _object_error_category::message(int ev) const {
"defined.");
}
-error_condition _object_error_category::default_error_condition(int ev) const {
- if (ev == object_error::success)
+error_condition _object_error_category::default_error_condition(int EV) const {
+ if (static_cast<object_error>(EV) == object_error::success)
return error_condition();
return errc::invalid_argument;
}
OpenPOWER on IntegriCloud