[llvm] [Instrumentation] Mark instrumented calls as implicit (PR #106447)

Jeremy Morse via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 5 03:17:21 PDT 2024


================
@@ -949,7 +949,7 @@ void ModuleSanitizerCoverage::InjectCoverageAtBlock(Function &F, BasicBlock &BB,
   DebugLoc EntryLoc;
   if (IsEntryBB) {
     if (auto SP = F.getSubprogram())
-      EntryLoc = DILocation::get(SP->getContext(), SP->getScopeLine(), 0, SP);
+      EntryLoc = DILocation::get(SP->getContext(), 0, 0, SP);
----------------
jmorse wrote:

IMHO this warrants a comment along the lines of "Use a compile-generated source-location for all coverage calls", to aid future readers

https://github.com/llvm/llvm-project/pull/106447


More information about the llvm-commits mailing list