projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Reapply [FastISel] Let the target decide first if it wants to materialize a constant...
[oota-llvm.git]
/
lib
/
ProfileData
/
InstrProf.cpp
diff --git
a/lib/ProfileData/InstrProf.cpp
b/lib/ProfileData/InstrProf.cpp
index ecabdd75bdf73556347101e51f08f0191a2acb15..01212227206719b2ad18804960a418fce61dc574 100644
(file)
--- a/
lib/ProfileData/InstrProf.cpp
+++ b/
lib/ProfileData/InstrProf.cpp
@@
-18,10
+18,10
@@
using namespace llvm;
namespace {
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 {
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";
switch (E) {
case instrprof_error::success:
return "Success";
@@
-29,8
+29,12
@@
class InstrProfErrorCategoryType : public error_category {
return "End of File";
case instrprof_error::bad_magic:
return "Invalid file format (bad magic)";
return "End of File";
case instrprof_error::bad_magic:
return "Invalid file format (bad magic)";
+ case instrprof_error::bad_header:
+ return "Invalid header";
case instrprof_error::unsupported_version:
return "Unsupported format version";
case instrprof_error::unsupported_version:
return "Unsupported format version";
+ case instrprof_error::unsupported_hash_type:
+ return "Unsupported hash function";
case instrprof_error::too_large:
return "Too much profile data";
case instrprof_error::truncated:
case instrprof_error::too_large:
return "Too much profile data";
case instrprof_error::truncated:
@@
-48,15
+52,10
@@
class InstrProfErrorCategoryType : public error_category {
}
llvm_unreachable("A value of instrprof_error has no message.");
}
}
llvm_unreachable("A value of instrprof_error has no message.");
}
- error_condition default_error_condition(int EV) const {
- if (EV == instrprof_error::success)
- return errc::success;
- return errc::invalid_argument;
- }
};
}
};
}
-const error_category &llvm::instrprof_category() {
+const
std::
error_category &llvm::instrprof_category() {
static InstrProfErrorCategoryType C;
return C;
}
static InstrProfErrorCategoryType C;
return C;
}