InstrProf: Promote this assert to a report_fatal_error

If this assert does fire, the no-asserts behaviour is an infinite
loop. It's better to crash in this case so we get a crash report and
stop wasting the user's cpu cycles.

llvm-svn: 242591
This commit is contained in:
Justin Bogner 2015-07-17 23:31:21 +00:00
parent 41b3226637
commit dceaaadf5c
1 changed files with 2 additions and 2 deletions

View File

@ -413,8 +413,8 @@ struct CounterCoverageMappingBuilder
SourceRegions.emplace_back(Region.getCounter(), NestedLoc, EndLoc);
EndLoc = getPreciseTokenLocEnd(getIncludeOrExpansionLoc(EndLoc));
assert(!EndLoc.isInvalid() &&
"File exit was not handled before popRegions");
if (EndLoc.isInvalid())
llvm::report_fatal_error("File exit not handled before popRegions");
}
Region.setEndLoc(EndLoc);