[PATCH] D100158: [SantizerCoverage] test case demonstrating PR39531

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 9 11:56:36 PDT 2021


dblaikie added a comment.

In D100158#2680116 <https://reviews.llvm.org/D100158#2680116>, @nickdesaulniers wrote:

> In D100158#2678482 <https://reviews.llvm.org/D100158#2678482>, @dblaikie wrote:
>
>> My best guess would be that any call synthesized from an instruction without a location should probably just get a zero line scoped directly to the current function.
>
> Sure. Should we do that unconditionally for the inserted `CallInst`, or predicate it on debug info being requested for the compilation, or something else?

This constraint (that calls have a !dbg location) only exists when the calling llvm::Function has a !dbg attached DISubprogram. So basically retrieve the caller's DISubprogram, if it exists, create a line 0 DILocation with the DISubprogram as the scope.

(we might already have some code for this in the merge debug location code? some fallback for call instructions when merged locations disagree or one is empty, etc)


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