aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenFunction.cpp
diff options
context:
space:
mode:
authorVedant Kumar <vsk@apple.com>2020-06-24 11:33:28 -0700
committerVedant Kumar <vsk@apple.com>2020-06-26 17:18:15 -0700
commit9649c2095f07a392bc2b2a93b5bd6c4c9bf5ba34 (patch)
tree34185bbccfcf228a92afc06b080b80551c89fd80 /clang/lib/CodeGen/CodeGenFunction.cpp
parent2b00cacb2835d11cab6f71466604b7b1bdd46a8d (diff)
downloadllvm-9649c2095f07a392bc2b2a93b5bd6c4c9bf5ba34.zip
llvm-9649c2095f07a392bc2b2a93b5bd6c4c9bf5ba34.tar.gz
llvm-9649c2095f07a392bc2b2a93b5bd6c4c9bf5ba34.tar.bz2
[InstCombine] Drop debug loc in TryToSinkInstruction (reland)
Summary: The advice in HowToUpdateDebugInfo.rst is to "... preserve the debug location of an instruction if the instruction either remains in its basic block, or if its basic block is folded into a predecessor that branches unconditionally". TryToSinkInstruction doesn't seem to satisfy the criteria as it's sinking an instruction to some successor block. Preserving the debug loc can make single-stepping appear to go backwards, or make a breakpoint hit on that location happen "too late" (since single-stepping from that breakpoint can cause the function to return unexpectedly). So, drop the debug location. This was reverted in ee3620643dfc because it removed source locations from inlinable calls, breaking a verifier rule. I've added an exception for calls because the alternative (setting a line 0 location) is not better. I tested the updated patch by completing a stage2 RelWithDebInfo build. Reviewers: aprantl, davide Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D82487
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.cpp')
0 files changed, 0 insertions, 0 deletions