mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-19 04:26:05 +00:00
InstrProf: Give coverage its own errors instead of piggy backing on instrprof
Since the coverage mapping reader and the instrprof reader were emitting a shared set of error codes, the error messages you'd get back from llvm-cov were ambiguous about what was actually wrong. Add another error category to fix this. I've also improved the wording on a couple of the instrprof errors, for consistency. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236665 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -484,7 +484,26 @@ template<> struct DenseMapInfo<coverage::CounterExpression> {
|
||||
}
|
||||
};
|
||||
|
||||
const std::error_category &coveragemap_category();
|
||||
|
||||
enum class coveragemap_error {
|
||||
success = 0,
|
||||
eof,
|
||||
no_data_found,
|
||||
unsupported_version,
|
||||
truncated,
|
||||
malformed
|
||||
};
|
||||
|
||||
inline std::error_code make_error_code(coveragemap_error E) {
|
||||
return std::error_code(static_cast<int>(E), coveragemap_category());
|
||||
}
|
||||
|
||||
} // end namespace llvm
|
||||
|
||||
namespace std {
|
||||
template <>
|
||||
struct is_error_code_enum<llvm::coveragemap_error> : std::true_type {};
|
||||
}
|
||||
|
||||
#endif // LLVM_PROFILEDATA_COVERAGEMAPPING_H_
|
||||
|
Reference in New Issue
Block a user