]> granicus.if.org Git - clang/commit
[DebugInfo] Don't emit incorrect descriptions of thunk params (PR42627)
authorVedant Kumar <vsk@apple.com>
Mon, 29 Jul 2019 22:49:55 +0000 (22:49 +0000)
committerVedant Kumar <vsk@apple.com>
Mon, 29 Jul 2019 22:49:55 +0000 (22:49 +0000)
commit794e0404d20d2ef4a60d253a3e3432fcdf80dac9
treed40b50172c6cfb546663384c0f0219dd1509f40c
parente77d2c50fc4b88c0740896db422ce0129c6894e7
[DebugInfo] Don't emit incorrect descriptions of thunk params (PR42627)

The `this` parameter of a thunk requires adjustment. Stop emitting an
incorrect dbg.declare pointing to the unadjusted pointer.

We could describe the adjusted value instead, but there may not be much
benefit in doing so as users tend not to debug thunks.

Robert O'Callahan reports that this matches gcc's behavior.

Fixes PR42627.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@367269 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CGDecl.cpp
test/CodeGenCXX/thunks.cpp