]> granicus.if.org Git - clang/commit
DebugInfo: Attribute cleanup code to the end of the scope, not the end of the function.
authorDavid Blaikie <dblaikie@gmail.com>
Wed, 4 Feb 2015 19:47:54 +0000 (19:47 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Wed, 4 Feb 2015 19:47:54 +0000 (19:47 +0000)
commitc2d8f6b982132ebf20345f85c415a49b843b67d8
tree7beb405e6de179ce27069e343b723363b3ef9754
parentcd61356464db503332e6c529a4f157894431b006
DebugInfo: Attribute cleanup code to the end of the scope, not the end of the function.

Now if you break on a dtor and go 'up' in your debugger (or you get an
asan failure in a dtor) during an exception unwind, you'll have more
context. Instead of all dtors appearing to be called from the '}' of the
function, they'll be attributed to the end of the scope of the variable,
the same as the non-exceptional dtor call.

This doesn't /quite/ remove all uses of CurEHLocation (which might be
nice to remove, for a few reasons) - it's still used to choose the
location for some other work in the landing pad. It'd be nice to
attribute that code to the same location as the exception calls within
the block and to remove CurEHLocation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@228181 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CGCleanup.cpp
lib/CodeGen/CGDebugInfo.cpp
lib/CodeGen/CodeGenFunction.cpp
lib/CodeGen/CodeGenFunction.h
test/CodeGenCXX/debug-info-line.cpp
test/CodeGenCXX/linetable-cleanup.cpp
test/CodeGenObjC/arc-linetable.m