Please use GitHub pull requests for new patches. Phabricator shutdown timeline
Changeset View
Changeset View
Standalone View
Standalone View
llvm/trunk/lib/Transforms/Instrumentation/GCOVProfiling.cpp
Show First 20 Lines • Show All 587 Lines • ▼ Show 20 Lines | for (auto &F : M->functions()) { | ||||
// declaration, not necessarily any statements or expressions. | // declaration, not necessarily any statements or expressions. | ||||
if (isa<DbgInfoIntrinsic>(&I)) continue; | if (isa<DbgInfoIntrinsic>(&I)) continue; | ||||
const DebugLoc &Loc = I.getDebugLoc(); | const DebugLoc &Loc = I.getDebugLoc(); | ||||
if (!Loc) | if (!Loc) | ||||
continue; | continue; | ||||
// Artificial lines such as calls to the global constructors. | // Artificial lines such as calls to the global constructors. | ||||
if (Loc.getLine() == 0) continue; | if (Loc.getLine() == 0 || Loc.isImplicitCode()) | ||||
continue; | |||||
if (Line == Loc.getLine()) continue; | if (Line == Loc.getLine()) continue; | ||||
Line = Loc.getLine(); | Line = Loc.getLine(); | ||||
if (SP != getDISubprogram(Loc.getScope())) | if (SP != getDISubprogram(Loc.getScope())) | ||||
continue; | continue; | ||||
GCOVLines &Lines = Block.getFile(SP->getFilename()); | GCOVLines &Lines = Block.getFile(SP->getFilename()); | ||||
Lines.addLine(Loc.getLine()); | Lines.addLine(Loc.getLine()); | ||||
▲ Show 20 Lines • Show All 456 Lines • Show Last 20 Lines |