Explain why we skip DbgInfoIntrinsics when looking at line numbers in .gcno file emission.

llvm-svn: 210218
This commit is contained in:
Nick Lewycky 2014-06-04 21:47:19 +00:00
parent 910640b5d8
commit ce98b43316
1 changed files with 4 additions and 0 deletions

View File

@ -454,6 +454,8 @@ static bool functionHasLines(Function *F) {
for (Function::iterator BB = F->begin(), E = F->end(); BB != E; ++BB) {
for (BasicBlock::iterator I = BB->begin(), IE = BB->end();
I != IE; ++I) {
// Debug intrinsic locations correspond to the location of the
// declaration, not necessarily any statements or expressions.
if (isa<DbgInfoIntrinsic>(I)) continue;
const DebugLoc &Loc = I->getDebugLoc();
if (Loc.isUnknown()) continue;
@ -516,6 +518,8 @@ void GCOVProfiler::emitProfileNotes() {
uint32_t Line = 0;
for (BasicBlock::iterator I = BB->begin(), IE = BB->end();
I != IE; ++I) {
// Debug intrinsic locations correspond to the location of the
// declaration, not necessarily any statements or expressions.
if (isa<DbgInfoIntrinsic>(I)) continue;
const DebugLoc &Loc = I->getDebugLoc();
if (Loc.isUnknown()) continue;