X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FProfileData%2FInstrProf.cpp;h=01212227206719b2ad18804960a418fce61dc574;hb=56c15de38a1c43bc0fcfb19fa655d68af3479d7d;hp=60a8efb2a6ad7ed13fed380fb0de0b7e18cd65de;hpb=c145fd3cf5f9b9bb666267869eb556c54cdd5194;p=oota-llvm.git diff --git a/lib/ProfileData/InstrProf.cpp b/lib/ProfileData/InstrProf.cpp index 60a8efb2a6a..01212227206 100644 --- a/lib/ProfileData/InstrProf.cpp +++ b/lib/ProfileData/InstrProf.cpp @@ -18,10 +18,10 @@ using namespace llvm; namespace { -class InstrProfErrorCategoryType : public error_category { - const char *name() const override { return "llvm.instrprof"; } +class InstrProfErrorCategoryType : public std::error_category { + const char *name() const LLVM_NOEXCEPT override { return "llvm.instrprof"; } std::string message(int IE) const override { - instrprof_error::ErrorType E = static_cast(IE); + instrprof_error E = static_cast(IE); switch (E) { case instrprof_error::success: return "Success"; @@ -52,15 +52,10 @@ 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) - return error_condition(); - return errc::invalid_argument; - } }; } -const error_category &llvm::instrprof_category() { +const std::error_category &llvm::instrprof_category() { static InstrProfErrorCategoryType C; return C; }