forked from OSchip/llvm-project
InstrProf: Update for LLVM API change
Update for the API change in r228075 llvm-svn: 228076
This commit is contained in:
parent
26b3142d34
commit
fd34280b8e
clang/lib/CodeGen
|
@ -246,9 +246,8 @@ public:
|
||||||
unsigned ColumnStart = SM.getSpellingColumnNumber(LocStart);
|
unsigned ColumnStart = SM.getSpellingColumnNumber(LocStart);
|
||||||
unsigned LineEnd = SM.getSpellingLineNumber(LocEnd);
|
unsigned LineEnd = SM.getSpellingLineNumber(LocEnd);
|
||||||
unsigned ColumnEnd = SM.getSpellingColumnNumber(LocEnd);
|
unsigned ColumnEnd = SM.getSpellingColumnNumber(LocEnd);
|
||||||
CounterMappingRegion Region(Counter(), *CovFileID, LineStart, ColumnStart,
|
auto Region = CounterMappingRegion::makeSkipped(
|
||||||
LineEnd, ColumnEnd,
|
*CovFileID, LineStart, ColumnStart, LineEnd, ColumnEnd);
|
||||||
CounterMappingRegion::SkippedRegion);
|
|
||||||
// Make sure that we only collect the regions that are inside
|
// Make sure that we only collect the regions that are inside
|
||||||
// the souce code of this function.
|
// the souce code of this function.
|
||||||
if (Region.LineStart >= FileLineRanges[*CovFileID].first &&
|
if (Region.LineStart >= FileLineRanges[*CovFileID].first &&
|
||||||
|
@ -284,10 +283,9 @@ public:
|
||||||
ColumnStart +
|
ColumnStart +
|
||||||
Lexer::MeasureTokenLength(SM.getSpellingLoc(LocStart), SM, LangOpts);
|
Lexer::MeasureTokenLength(SM.getSpellingLoc(LocStart), SM, LangOpts);
|
||||||
|
|
||||||
MappingRegions.push_back(CounterMappingRegion(
|
MappingRegions.push_back(CounterMappingRegion::makeExpansion(
|
||||||
Counter(), *CovFileID, LineStart, ColumnStart, LineEnd, ColumnEnd,
|
*CovFileID, *ExpandedFileID, LineStart, ColumnStart, LineEnd,
|
||||||
CounterMappingRegion::ExpansionRegion));
|
ColumnEnd));
|
||||||
MappingRegions.back().ExpandedFileID = *ExpandedFileID;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// \brief Enter a source region group that is identified by the given
|
/// \brief Enter a source region group that is identified by the given
|
||||||
|
@ -375,9 +373,9 @@ public:
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
assert(LineStart <= LineEnd);
|
assert(LineStart <= LineEnd);
|
||||||
MappingRegions.push_back(CounterMappingRegion(
|
MappingRegions.push_back(CounterMappingRegion::makeRegion(
|
||||||
I->getCounter(), *CovFileID, LineStart, ColumnStart, LineEnd,
|
I->getCounter(), *CovFileID, LineStart, ColumnStart, LineEnd,
|
||||||
ColumnEnd, CounterMappingRegion::CodeRegion));
|
ColumnEnd));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue