llvm-project/clang/test/CodeGenObjCXX
David Blaikie 8e6c36eb80 DebugInfo: Don't leak location information from one function into the prologue of the next function.
CodeGenFunction objects aren't really designed to be reused for more
than one function, and doing so can leak debug info location information
from one function into the prologue of the next.

Add an assertion in to catch reuses of CodeGenFunction, which
surprisingly only caught the ObjC atomic getter/setter cases. Fix those
and add a test to demonstrate the issue.

The test is a bit slim, because we're just testing for the absence of a
debug location on the prologue instructions, which by itself probably
wouldn't be the end of the world - but the particular debug location
that was ending up there was for the previous function's last
instruction. This produced debug info for another function within this
function, which is something I'm trying to remove all cases of as its a
substantial source of bugs, especially around inlining (see r219215).

llvm-svn: 219690
2014-10-14 16:43:46 +00:00
..
Inputs Objective-C ARC. Use of non-retain/autorelease API 2014-08-08 17:31:14 +00:00
2007-10-03-MetadataPointers.mm
2010-08-04-Template.mm
2010-08-06-X.Y-syntax.mm
address-safety-attr.mm Unify clang/llvm attributes for asan/tsan/msan (Clang part) 2013-02-26 06:58:27 +00:00
arc-attrs.mm Don't pass -O0 to clang_cc1, it is the default. 2013-09-04 04:12:25 +00:00
arc-blocks.mm Mark C++ reference parameters as dereferenceable 2014-07-18 15:52:10 +00:00
arc-cxx11-member-init.mm Objective-C++ IRGen. Due to change to AST for initialization of c++11’s 2014-03-14 15:40:54 +00:00
arc-exceptions.mm CHECK-LABEL-ify some code gen tests to improve diagnostic experience when tests fail. 2013-08-15 06:47:53 +00:00
arc-globals.mm Include translation unit filename in global ctor symbol names. 2014-05-06 20:32:45 +00:00
arc-mangle.mm Remove the -cxx-abi command-line flag. 2014-01-14 19:35:09 +00:00
arc-move.mm Revert "Remove threshold on object size for inserting lifetime begin / end" 2014-10-08 14:04:26 +00:00
arc-new-delete.mm CHECK-LABEL-ify some code gen tests to improve diagnostic experience when tests fail. 2013-08-15 06:47:53 +00:00
arc-pseudo-destructors.mm CHECK-LABEL-ify some code gen tests to improve diagnostic experience when tests fail. 2013-08-15 06:47:53 +00:00
arc-references.mm Revert "Remove threshold on object size for inserting lifetime begin / end" 2014-10-08 14:04:26 +00:00
arc-returns-inner-reference-ptr.mm
arc-special-member-functions.mm Mark C++ reference parameters as dereferenceable 2014-07-18 15:52:10 +00:00
arc.mm Revert "Remove threshold on object size for inserting lifetime begin / end" 2014-10-08 14:04:26 +00:00
block-id.mm CodeGenObjCXX: Add a test for r214699 2014-08-05 00:01:15 +00:00
block-in-template-inst.mm
block-var-layout.mm Don't pass -O0 to clang_cc1, it is the default. 2013-09-04 04:12:25 +00:00
blocks.mm Don't try to do RVO on block variables that refer to an enclosing local. 2012-07-11 22:50:15 +00:00
catch-id-type.mm Introduce a new mangling for protocol-qualified ObjC types in C++. This allows 2013-06-18 22:41:37 +00:00
copy.mm
copyable-property-object.mm
debug-info.mm
destroy.mm Fix an assertion failure trying to emit a trivial destructor in ObjC++ 2014-09-26 15:27:29 +00:00
encode.mm Use private linkage for globals we already name with \01L and \01l. 2014-02-27 19:01:11 +00:00
exceptions-legacy.mm CHECK-LABEL-ify some code gen tests to improve diagnostic experience when tests fail. 2013-08-15 06:47:53 +00:00
exceptions.mm CHECK-LABEL-ify some code gen tests to improve diagnostic experience when tests fail. 2013-08-15 06:47:53 +00:00
externally-initialized-selectors.mm Use private linkage for globals we already name with \01L and \01l. 2014-02-27 19:01:11 +00:00
foreach-statement.mm
gc.mm CHECK-LABEL-ify some code gen tests to improve diagnostic experience when tests fail. 2013-08-15 06:47:53 +00:00
implementation-in-extern-c.mm objective-C IRGen: for @implementation nested in 2012-10-26 20:22:11 +00:00
implicit-copy-assign-operator.mm Mark C++ reference parameters as dereferenceable 2014-07-18 15:52:10 +00:00
implicit-copy-constructor.mm Mark C++ reference parameters as dereferenceable 2014-07-18 15:52:10 +00:00
ivar-objects.mm
lambda-expressions.mm Use private linkage for globals we already name with \01L and \01l. 2014-02-27 19:01:11 +00:00
literals.mm Revert "Remove threshold on object size for inserting lifetime begin / end" 2014-10-08 14:04:26 +00:00
lvalue-reference-getter.mm Mark C++ reference parameters as dereferenceable 2014-07-18 15:52:10 +00:00
mangle-blocks.mm AST: Fix the mangling for unqualified-blocks 2014-08-04 06:16:50 +00:00
mangle.mm CHECK-LABEL-ify some code gen tests to improve diagnostic experience when tests fail. 2013-08-15 06:47:53 +00:00
message-reference.mm Mark C++ reference parameters as dereferenceable 2014-07-18 15:52:10 +00:00
message.mm CHECK-LABEL-ify some code gen tests to improve diagnostic experience when tests fail. 2013-08-15 06:47:53 +00:00
method-local-extern-mangle.mm
microsoft-abi-arc-param-order.mm [ms-cxxabi] Use inalloca on win32 when passing non-trivial C++ objects 2014-02-01 00:04:45 +00:00
nrvo.mm CHECK-LABEL-ify some code gen tests to improve diagnostic experience when tests fail. 2013-08-15 06:47:53 +00:00
objc-container-subscripting-1.mm CHECK-LABEL-ify some code gen tests to improve diagnostic experience when tests fail. 2013-08-15 06:47:53 +00:00
objc-container-subscripting.mm CHECK-LABEL-ify some code gen tests to improve diagnostic experience when tests fail. 2013-08-15 06:47:53 +00:00
pr14474-gline-tables-only.mm Fix PR14474: don't emit debug info for interface types in -gline-tables-only mode. 2012-12-03 18:28:12 +00:00
property-derived-to-base-conv.mm
property-dot-copy.mm
property-dot-reference.mm Mark C++ reference parameters as dereferenceable 2014-07-18 15:52:10 +00:00
property-lvalue-capture.mm Mark C++ reference parameters as dereferenceable 2014-07-18 15:52:10 +00:00
property-object-conditional-exp.mm
property-object-reference-1.mm
property-object-reference-2.mm Mark C++ reference parameters as dereferenceable 2014-07-18 15:52:10 +00:00
property-object-reference.mm
property-objects.mm DebugInfo: Don't leak location information from one function into the prologue of the next function. 2014-10-14 16:43:46 +00:00
property-reference.mm Mark C++ reference parameters as dereferenceable 2014-07-18 15:52:10 +00:00
refence-assign-write-barrier.mm
references.mm CHECK-LABEL-ify some code gen tests to improve diagnostic experience when tests fail. 2013-08-15 06:47:53 +00:00
rtti.mm type_info objects are not unnamed_addr: the ABI requires us to 2014-02-08 03:26:05 +00:00
selector-expr-lvalue.mm
unknown-anytype.mm CHECK-LABEL-ify some code gen tests to improve diagnostic experience when tests fail. 2013-08-15 06:47:53 +00:00
write-barrier-global-assign.mm