summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2014-06-03 05:12:33 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2014-06-03 05:12:33 +0000
commit92512e89a2a653eb5b9fb5485c8681f225ebaf1e (patch)
treed30ebf96e951b9ec8d582dda01ecc6a5ff1eacbc /llvm/lib
parentc7dd10b2211fdba998d6ebd0a8a4c8abd9dd6040 (diff)
downloadbcm5719-llvm-92512e89a2a653eb5b9fb5485c8681f225ebaf1e.tar.gz
bcm5719-llvm-92512e89a2a653eb5b9fb5485c8681f225ebaf1e.zip
Use an enum class.
Might also fix the windows build. llvm-svn: 210077
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/ProfileData/InstrProf.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/ProfileData/InstrProf.cpp b/llvm/lib/ProfileData/InstrProf.cpp
index 60a8efb2a6a..a6583130ee7 100644
--- a/llvm/lib/ProfileData/InstrProf.cpp
+++ b/llvm/lib/ProfileData/InstrProf.cpp
@@ -21,7 +21,7 @@ namespace {
class InstrProfErrorCategoryType : public error_category {
const char *name() const override { return "llvm.instrprof"; }
std::string message(int IE) const override {
- instrprof_error::ErrorType E = static_cast<instrprof_error::ErrorType>(IE);
+ instrprof_error E = static_cast<instrprof_error>(IE);
switch (E) {
case instrprof_error::success:
return "Success";
@@ -53,7 +53,7 @@ class InstrProfErrorCategoryType : public error_category {
llvm_unreachable("A value of instrprof_error has no message.");
}
error_condition default_error_condition(int EV) const override {
- if (EV == instrprof_error::success)
+ if (static_cast<instrprof_error>(EV) == instrprof_error::success)
return error_condition();
return errc::invalid_argument;
}
OpenPOWER on IntegriCloud