[PATCH] D27462: For functions with debug info, do not propagate the callsite debug location to inlined instructions.

Paul Robinson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 6 11:29:28 PST 2016


probinson added inline comments.


================
Comment at: lib/Transforms/Utils/InlineFunction.cpp:1377-1378
       if (!DL) {
+        if (CalleeHasDebugInfo)
+          continue;
         // If the inlined instruction has no line number, make it look as if it
----------------
dblaikie wrote:
> Leaving this instruction without a location at all may be problematic - it's still certainly inlined from this other function... - what can we do about that, if anything? (only thing that comes to mind is giving it a zero debug location, but that doesn't sound right)
> 
> Maybe no debug location is the right solution... - I wonder how that interacts with the inline range for the instruction, etc.
If it had no location in the called function, seems like it's not inherently different for it to have no location when moved into the calling function.  An instruction with no location implicitly inherits the preceding location, no? That's no different in the caller than the callee.


https://reviews.llvm.org/D27462





More information about the llvm-commits mailing list