mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-15 21:24:00 +00:00
Fix coverage for files with global constructors again. Adds a testcase to the commit from r206671, as requested by David Blaikie.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210239 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -457,8 +457,13 @@ static bool functionHasLines(Function *F) {
|
||||
// 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;
|
||||
|
||||
// Artificial lines such as calls to the global constructors.
|
||||
if (Loc.getLine() == 0) continue;
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@ -521,8 +526,13 @@ void GCOVProfiler::emitProfileNotes() {
|
||||
// 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;
|
||||
|
||||
// Artificial lines such as calls to the global constructors.
|
||||
if (Loc.getLine() == 0) continue;
|
||||
|
||||
if (Line == Loc.getLine()) continue;
|
||||
Line = Loc.getLine();
|
||||
if (SP != getDISubprogram(Loc.getScope(*Ctx))) continue;
|
||||
|
Reference in New Issue
Block a user