[PATCH] D100158: [SantizerCoverage] handle missing DBG MD when inserting libcalls

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 9 17:46:45 PDT 2021


dblaikie 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)
----------------
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?)


================
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:
----------------
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.


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