Fix the dtor location issues in PR20038 harder.
authorDavid Blaikie <dblaikie@gmail.com>
Thu, 10 Jul 2014 20:42:59 +0000 (20:42 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Thu, 10 Jul 2014 20:42:59 +0000 (20:42 +0000)
commit1b5adb82d9a72cf36f4c3864c55388a8eb243de4
tree5d228a150dcf6f689a6ea34b2833eb0e1daa0ce9
parent026861b87d7bfbdaf31ced93e8c916008b72cce8
Fix the dtor location issues in PR20038 harder.

Originally committed in r211722, this fixed one case of dtor calls being
emitted without locations (this causes problems for debug info if the
call is then inlined), this caught only some of the cases.

Instead of trying to re-enable the location before the cleanup, simply
re-enable the location immediately after the unconditional branches in
question using a scoped device to ensure the no-location state doesn't
leak out arbitrarily.

llvm-svn: 212761
clang/lib/CodeGen/CGExprScalar.cpp
clang/lib/CodeGen/CGStmt.cpp
clang/lib/CodeGen/CodeGenFunction.h
clang/test/CodeGenCXX/PR20038.cpp