]> granicus.if.org Git - clang/commit
PR32042: Create inlined debug info for EmitInlinedInheritingCXXConstructorCall.
authorAdrian Prantl <aprantl@apple.com>
Mon, 27 Feb 2017 21:30:05 +0000 (21:30 +0000)
committerAdrian Prantl <aprantl@apple.com>
Mon, 27 Feb 2017 21:30:05 +0000 (21:30 +0000)
commit2b9de2a12492f72ff26b796e6230a256c06697ca
treef32c902d25cbcef2cc8d12db19c5d7ae369e75c5
parentf3df0a587e9cf78d14d2e6544bc0bc448dfe8fb4
PR32042: Create inlined debug info for EmitInlinedInheritingCXXConstructorCall.

When clang emits an inheriting C++ constructor it may inline code
during the CodeGen phase. This patch ensures that any debug info in
this inlined code gets a proper inlined location. Otherwise we can end
up with invalid debug info metadata, since all inlined local variables
and function arguments would be reparented into the call site.

Analogous to ApplyInlineLocation this patch introduces a
ApplyInlineDebugLocation scoped helper to facilitate entering an
inlined scope and cleaning up afterwards.

This fixes one of the issues discovered in PR32042.

rdar://problem/30679307

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@296388 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CGClass.cpp
lib/CodeGen/CGDebugInfo.cpp
lib/CodeGen/CGDebugInfo.h
test/CodeGenCXX/debug-info-inheriting-constructor.cpp [new file with mode: 0644]