[PATCH] D67283: [GCOV] Skip artificial functions from being emitted
Alexandre Ganea via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 6 09:00:48 PDT 2019
aganea created this revision.
aganea added a reviewer: rnk.
Herald added a project: LLVM.
I had to revert D66328 <https://reviews.llvm.org/D66328> because it was breaking asan, see here <http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux/builds/23289/steps/check-asan%20in%20gcc%20build/logs/stdio> or here <http://lab.llvm.org:8080/green/job/clang-stage1-RA/1671/consoleFull#20794254328254eaf0-7326-4999-85b0-388101f2d404>. Before I could commit it again, it would need this patch.
Repository:
rL LLVM
https://reviews.llvm.org/D67283
Files:
lib/Transforms/Instrumentation/GCOVProfiling.cpp
Index: lib/Transforms/Instrumentation/GCOVProfiling.cpp
===================================================================
--- lib/Transforms/Instrumentation/GCOVProfiling.cpp
+++ lib/Transforms/Instrumentation/GCOVProfiling.cpp
@@ -683,7 +683,8 @@
for (auto &F : M->functions()) {
DISubprogram *SP = F.getSubprogram();
if (!SP) continue;
- if (!functionHasLines(F) || !isFunctionInstrumented(F))
+ if (SP->isArtificial() || !functionHasLines(F) ||
+ !isFunctionInstrumented(F))
continue;
// TODO: Functions using scope-based EH are currently not supported.
if (isUsingScopeBasedEH(F)) continue;
@@ -769,7 +770,8 @@
for (auto &F : M->functions()) {
DISubprogram *SP = F.getSubprogram();
if (!SP) continue;
- if (!functionHasLines(F) || !isFunctionInstrumented(F))
+ if (SP->isArtificial() || !functionHasLines(F) ||
+ !isFunctionInstrumented(F))
continue;
// TODO: Functions using scope-based EH are currently not supported.
if (isUsingScopeBasedEH(F)) continue;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D67283.219119.patch
Type: text/x-patch
Size: 1086 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190906/fbe38679/attachment.bin>
More information about the llvm-commits
mailing list