X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FProfileData%2FInstrProf.cpp;h=01212227206719b2ad18804960a418fce61dc574;hb=f08cddcf560b1eb8401d405501e26cf3c3843fb4;hp=88ae7582ccbdaf986e61bf28632ee7c18ae1eff3;hpb=173d7ff83300ece5cc18049cf5c909c1e8d179d9;p=oota-llvm.git diff --git a/lib/ProfileData/InstrProf.cpp b/lib/ProfileData/InstrProf.cpp index 88ae7582ccb..01212227206 100644 --- a/lib/ProfileData/InstrProf.cpp +++ b/lib/ProfileData/InstrProf.cpp @@ -18,7 +18,7 @@ using namespace llvm; namespace { -class InstrProfErrorCategoryType : public error_category { +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 E = static_cast(IE); @@ -52,16 +52,10 @@ class InstrProfErrorCategoryType : public error_category { } llvm_unreachable("A value of instrprof_error has no message."); } - std::error_condition - default_error_condition(int EV) const LLVM_NOEXCEPT override { - if (static_cast(EV) == instrprof_error::success) - return std::error_condition(); - return std::errc::invalid_argument; - } }; } -const error_category &llvm::instrprof_category() { +const std::error_category &llvm::instrprof_category() { static InstrProfErrorCategoryType C; return C; }