]> granicus.if.org Git - clang/commit
[CGBlocks] Improve line info in backtraces containing *_helper_block
authorVedant Kumar <vsk@apple.com>
Thu, 26 Oct 2017 21:27:24 +0000 (21:27 +0000)
committerVedant Kumar <vsk@apple.com>
Thu, 26 Oct 2017 21:27:24 +0000 (21:27 +0000)
commit290485ca2ff922bb3da08c784323e7e25acbcfde
tree99ade15543e288a141e5f38a4e7a0b5c7f0cedcf
parent28250cddcac412897f421b4b7069b663a102fd54
[CGBlocks] Improve line info in backtraces containing *_helper_block

Instead of only setting a non-zero debug location on the return
instruction in *_helper_block functions, set a proper location on all
instructions within these functions. Pick the start location of the
block literal expr for maximum clarity.

The debugger does not step into *_helper_block functions during normal
single-stepping because we mark their parameters as artificial. This is
what we want (the functions are implicitly generated and uninteresting
to most users). The stepping behavior is unchanged by this patch.

rdar://32907581

Differential Revision: https://reviews.llvm.org/D39310

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316704 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CGBlocks.cpp
test/CodeGenObjC/debug-info-blocks.m