InstrProf: Make CounterMappingRegions less confusing to construct
Creating empty and expansion regions is awkward with the current API. Expose static methods to make this simpler. llvm-svn: 228075
This commit is contained in:
@@ -210,10 +210,9 @@ std::error_code RawCoverageMappingReader::readMappingRegionsSubArray(
|
||||
dbgs() << "\n";
|
||||
});
|
||||
|
||||
MappingRegions.push_back(
|
||||
CounterMappingRegion(C, InferredFileID, LineStart, ColumnStart,
|
||||
LineStart + NumLines, ColumnEnd, Kind));
|
||||
MappingRegions.back().ExpandedFileID = ExpandedFileID;
|
||||
MappingRegions.push_back(CounterMappingRegion(
|
||||
C, InferredFileID, ExpandedFileID, LineStart, ColumnStart,
|
||||
LineStart + NumLines, ColumnEnd, Kind));
|
||||
}
|
||||
return success();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user