[PATCH] D100158: [SantizerCoverage] handle missing DBG MD when inserting libcalls
Nick Desaulniers via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 9 18:58:16 PDT 2021
nickdesaulniers marked 2 inline comments as done.
nickdesaulniers added inline comments.
================
Comment at: llvm/test/Instrumentation/SanitizerCoverage/crit-edge-sancov.ll:23
+; CHECK: if.end22.i:
+; CHECK-NEXT: call void @__sanitizer_cov_trace_pc() #[[ATTR0]], !dbg [[DBG7:![0-9]+]]
+; CHECK: [[DBG6]] = !DILocation(line: {{.*}}, scope: !3)
----------------
dblaikie wrote:
> DBG7 isn't checked against anything - should it be? (I guess it (the `EntryLoc = IP->getDebugLoc();` line, I guess) is hopefully already tested by existing tests?)
I can add it.
> I guess it (the EntryLoc = IP->getDebugLoc(); line, I guess) is hopefully already tested by existing tests?
Yes, llvm/test/Instrumentation/SanitizerCoverage/coverage2-dbg.ll does.
================
Comment at: llvm/test/Instrumentation/SanitizerCoverage/crit-edge-sancov.ll:24
+; CHECK-NEXT: call void @__sanitizer_cov_trace_pc() #[[ATTR0]], !dbg [[DBG7:![0-9]+]]
+; CHECK: [[DBG6]] = !DILocation(line: {{.*}}, scope: !3)
+entry:
----------------
dblaikie wrote:
> Probably good to check this is actually line 0, since that's what the code does intentionally - it'd be weird/problematic if we invented/used some other location.
I think it will be `scopeLine` of parent plus `0`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D100158/new/
https://reviews.llvm.org/D100158
More information about the llvm-commits
mailing list