diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2014-06-03 05:12:33 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2014-06-03 05:12:33 +0000 |
commit | 18b40871942620776499e77811c84a66627c8b1f (patch) | |
tree | 0de32a8333c81f0654efc45510e29eaea972cfdd /lib/ProfileData | |
parent | dacea252b55cfb798c5e2bca91ce85ac27bbab2f (diff) | |
download | llvm-18b40871942620776499e77811c84a66627c8b1f.tar.gz llvm-18b40871942620776499e77811c84a66627c8b1f.tar.bz2 llvm-18b40871942620776499e77811c84a66627c8b1f.tar.xz |
Use an enum class.
Might also fix the windows build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210077 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ProfileData')
-rw-r--r-- | lib/ProfileData/InstrProf.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/ProfileData/InstrProf.cpp b/lib/ProfileData/InstrProf.cpp index 60a8efb2a6..a6583130ee 100644 --- a/lib/ProfileData/InstrProf.cpp +++ b/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; } |