[PATCH] D19901: [ProfileData] (llvm) Use Error in InstrProf and Coverage
Vedant Kumar via llvm-commits
llvm-commits at lists.llvm.org
Thu May 12 12:17:45 PDT 2016
vsk marked 11 inline comments as done.
================
Comment at: include/llvm/ProfileData/InstrProf.h:259
@@ -263,3 +258,3 @@
enum class instrprof_error {
- success = 0,
+ success,
eof,
----------------
davidxl wrote:
> why this change?
I did it to catch cases where we treat instrprof_errors as bools or ints. It isn't directly related to this patch so I'll remove the change.
================
Comment at: lib/ProfileData/Coverage/CoverageMappingReader.cpp:45
@@ +44,3 @@
+ },
+ [&](const InstrProfError &IPE) {
+ handleErrorIfEOF(IPE.get() == instrprof_error::eof);
----------------
davidxl wrote:
> Can this ever happen?
Yes, thanks for pointing this out. In unittests/ProfileData/CoverageMappingTest.cpp, CoverageMappingReaderMock::readNextRecord() returns instrprof_error::eof instead of coveragemap_error::eof. Fixed in r269324.
http://reviews.llvm.org/D19901
More information about the llvm-commits
mailing list