]> granicus.if.org Git - clang/commit
Debug info for blocks: Fix a bug caught by the Verifier.
authorAdrian Prantl <aprantl@apple.com>
Fri, 21 Nov 2014 00:35:25 +0000 (00:35 +0000)
committerAdrian Prantl <aprantl@apple.com>
Fri, 21 Nov 2014 00:35:25 +0000 (00:35 +0000)
commit2bce6530840f02d2d0015859dd4c3dca0d17a056
tree1e429d946024fbe1b61ef98a1aef5aa80332a697
parent4a2879e2142fbfb97c3dffc59c024924949ef01d
Debug info for blocks: Fix a bug caught by the Verifier.
When emitting nested block definitions, the insert-at-point variant of
DIBuilder::insertDeclare() could be called with the insertion point set
to the end-of-BasicBlock sentinel, causing the parent pointer of the
CallInst to be set to the intentionally bogus value of the sentinel.

Fixed by conditionally invoking the correct version of insertDeclare().
rdar://problem/19034882

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222487 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CGBlocks.cpp
lib/CodeGen/CGDebugInfo.cpp
lib/CodeGen/CGDebugInfo.h
test/CodeGenObjC/debug-info-nested-blocks.m [new file with mode: 0644]