Skip to content

Commit 1688868

Browse files
committed
Revert "[gcov] Ignore blocks from another file"
This reverts commit 1f34e28. Test fails on x86-64 mac, see comments on https://reviews.llvm.org/rG1f34e282e8066281eb1447e21e44a2a2e9983e79.
1 parent 3f82109 commit 1688868

File tree

2 files changed

+1
-43
lines changed

2 files changed

+1
-43
lines changed

compiler-rt/test/profile/Posix/gcov-file-change.cpp

Lines changed: 0 additions & 40 deletions
This file was deleted.

llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -898,9 +898,7 @@ bool GCOVProfiler::emitProfileNotes(
898898

899899
if (Line == Loc.getLine()) continue;
900900
Line = Loc.getLine();
901-
MDNode *Scope = Loc.getScope();
902-
// TODO: Handle blocks from another file due to #line, #include, etc.
903-
if (isa<DILexicalBlockFile>(Scope) || SP != getDISubprogram(Scope))
901+
if (SP != getDISubprogram(Loc.getScope()))
904902
continue;
905903

906904
GCOVLines &Lines = Block.getFile(Filename);

0 commit comments

Comments
 (0)