mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-03 11:24:18 +00:00
llvm-cov: Use ErrorOr rather than an error_code* (NFC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217404 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -411,10 +411,10 @@ bool CodeCoverageTool::load() {
|
||||
}
|
||||
outs() << "\n";
|
||||
}
|
||||
std::error_code Error;
|
||||
Function.MappingRegions.push_back(
|
||||
MappingRegion(R, Ctx.evaluate(R.Count, Error)));
|
||||
if (Error && !RegionError) {
|
||||
ErrorOr<int64_t> ExecutionCount = Ctx.evaluate(R.Count);
|
||||
if (ExecutionCount) {
|
||||
Function.MappingRegions.push_back(MappingRegion(R, *ExecutionCount));
|
||||
} else if (!RegionError) {
|
||||
colored_ostream(errs(), raw_ostream::RED)
|
||||
<< "error: Regions and counters don't match in a function '"
|
||||
<< Function.Name << "' (re-run the instrumented binary).";
|
||||
|
Reference in New Issue
Block a user