InstrProf: Remove CoverageMapping::HasCodeBefore, it isn't used

It's not entirely clear to me what this field was meant for, but it's
always false. Remove it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228034 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Justin Bogner
2015-02-03 21:35:36 +00:00
parent dc5e49a1c4
commit a378f917af
7 changed files with 14 additions and 28 deletions

View File

@@ -173,15 +173,12 @@ std::error_code RawCoverageMappingReader::readMappingRegionsSubArray(
}
// Read the source range.
uint64_t LineStartDelta, CodeBeforeColumnStart, NumLines, ColumnEnd;
uint64_t LineStartDelta, ColumnStart, NumLines, ColumnEnd;
if (auto Err =
readIntMax(LineStartDelta, std::numeric_limits<unsigned>::max()))
return Err;
if (auto Err = readULEB128(CodeBeforeColumnStart))
if (auto Err = readULEB128(ColumnStart))
return Err;
bool HasCodeBefore = CodeBeforeColumnStart & 1;
uint64_t ColumnStart = CodeBeforeColumnStart >>
CounterMappingRegion::EncodingHasCodeBeforeBits;
if (ColumnStart > std::numeric_limits<unsigned>::max())
return error(instrprof_error::malformed);
if (auto Err = readIntMax(NumLines, std::numeric_limits<unsigned>::max()))
@@ -213,9 +210,9 @@ std::error_code RawCoverageMappingReader::readMappingRegionsSubArray(
dbgs() << "\n";
});
MappingRegions.push_back(CounterMappingRegion(
C, InferredFileID, LineStart, ColumnStart, LineStart + NumLines,
ColumnEnd, HasCodeBefore, Kind));
MappingRegions.push_back(
CounterMappingRegion(C, InferredFileID, LineStart, ColumnStart,
LineStart + NumLines, ColumnEnd, Kind));
MappingRegions.back().ExpandedFileID = ExpandedFileID;
}
return success();