llvm-6502/test/DebugInfo
David Blaikie eff0c67b6a Recommit r212203: Don't try to construct debug LexicalScopes hierarchy for functions that do not have top level debug information.
Reverted by Eric Christopher (Thanks!) in r212203 after Bob Wilson
reported LTO issues. Duncan Exon Smith and Aditya Nandakumar helped
provide a reduced reproduction, though the failure wasn't too hard to
guess, and even easier with the example to confirm.

The assertion that the subprogram metadata associated with an
llvm::Function matches the scope data referenced by the DbgLocs on the
instructions in that function is not valid under LTO. In LTO, a C++
inline function might exist in multiple CUs and the subprogram metadata
nodes will refer to the same llvm::Function. In this case, depending on
the order of the CUs, the first intance of the subprogram metadata may
not be the one referenced by the instructions in that function and the
assertion will fail.

A test case (test/DebugInfo/cross-cu-linkonce-distinct.ll) is added, the
assertion removed and a comment added to explain this situation.

Original commit message:

If a function isn't actually in a CU's subprogram list in the debug info
metadata, ignore all the DebugLocs and don't try to build scopes, track
variables, etc.

While this is possibly a minor optimization, it's also a correctness fix
for an incoming patch that will add assertions to LexicalScopes and the
debug info verifier to ensure that all scope chains lead to debug info
for the current function.

Fix up a few test cases that had broken/incomplete debug info that could
violate this constraint.

Add a test case where this occurs by design (inlining a
debug-info-having function in an attribute nodebug function - we want
this to work because /if/ the nodebug function is then inlined into a
debug-info-having function, it should be fine (and will work fine - we
just stitch the scopes up as usual), but should the inlining not happen
we need to not assert fail either).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212649 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-09 21:02:41 +00:00
..
AArch64 Emit DWARF3 call frame information when DWARF3+ debug info is requested 2014-06-19 15:39:33 +00:00
ARM Reduce verbiage of lit.local.cfg files 2014-06-09 22:42:55 +00:00
COFF Reduce verbiage of lit.local.cfg files 2014-06-09 22:42:55 +00:00
Inputs [DWARF parser] Fix broken address ranges construction. 2014-06-12 23:58:49 +00:00
Mips Reduce verbiage of lit.local.cfg files 2014-06-09 22:42:55 +00:00
PowerPC Reduce verbiage of lit.local.cfg files 2014-06-09 22:42:55 +00:00
Sparc Reduce verbiage of lit.local.cfg files 2014-06-09 22:42:55 +00:00
SystemZ Emit DWARF3 call frame information when DWARF3+ debug info is requested 2014-06-19 15:39:33 +00:00
X86 Recommit r212203: Don't try to construct debug LexicalScopes hierarchy for functions that do not have top level debug information. 2014-07-09 21:02:41 +00:00
2009-10-16-Phi.ll
2009-11-03-InsertExtractValue.ll Debug Info: update testing cases to specify the debug info version number. 2013-11-22 21:49:45 +00:00
2009-11-05-DeadGlobalVariable.ll Fix typos 2014-06-19 19:41:26 +00:00
2009-11-06-NamelessGlobalVariable.ll DebugInfo: Assert that a CU's subprogram list contains only subprograms. 2014-05-14 21:52:37 +00:00
2009-11-10-CurrentFn.ll DebugInfo: Remove some unneeded conditionals now that DIBuilder no longer emits zero-length arrays as {i32 0} 2014-02-04 01:23:52 +00:00
2010-01-05-DbgScope.ll Debug Info: update testing cases to specify the debug info version number. 2013-11-22 21:49:45 +00:00
2010-03-12-llc-crash.ll Debug Info: add an identifier field to DICompositeType. 2013-08-26 22:39:55 +00:00
2010-03-19-DbgDeclare.ll No need for those tests to go thru llvm-as and/or llvm-dis. 2014-05-27 22:03:28 +00:00
2010-03-24-MemberFn.ll Reland r200340 - 'Add line table debug info to COFF files when using a win32 triple' 2014-01-30 01:39:17 +00:00
2010-03-30-InvalidDbgInfoCrash.ll Debug Info: update testing cases to specify the debug info version number. 2013-11-22 21:49:45 +00:00
2010-04-06-NestedFnDbgInfo.ll DebugInfo: Lazily attach definition attributes to definitions. 2014-05-27 18:37:43 +00:00
2010-04-19-FramePtr.ll Reland r200340 - 'Add line table debug info to COFF files when using a win32 triple' 2014-01-30 01:39:17 +00:00
2010-05-03-DisableFramePtr.ll Debug Info: update testing cases to specify the debug info version number. 2013-11-22 21:49:45 +00:00
2010-05-03-OriginDIE.ll Debug Info: update testing cases to specify the debug info version number. 2013-11-22 21:49:45 +00:00
2010-05-10-MultipleCU.ll Reland r200340 - 'Add line table debug info to COFF files when using a win32 triple' 2014-01-30 01:39:17 +00:00
2010-06-29-InlinedFnLocalVar.ll DebugInfo: Remove some unneeded conditionals now that DIBuilder no longer emits zero-length arrays as {i32 0} 2014-02-04 01:23:52 +00:00
2010-07-19-Crash.ll DebugInfo: Assume the CU's Subprogram list only contains definitions. 2014-05-16 18:26:53 +00:00
2010-10-01-crash.ll Debug Info: update testing cases to specify the debug info version number. 2013-11-22 21:49:45 +00:00
arm-relocs.test Add support for the R_ARM_ABS32 relocation. 2014-04-03 02:27:00 +00:00
array.ll Reland r200340 - 'Add line table debug info to COFF files when using a win32 triple' 2014-01-30 01:39:17 +00:00
bug_null_debuginfo.ll Debug Info: update testing cases to specify the debug info version number. 2013-11-22 21:49:45 +00:00
constant-pointers.ll PR19767: DebugInfo emission of pointer constants. 2014-05-20 18:21:51 +00:00
cross-cu-inlining.ll DebugInfo: Following up to r209677, refactor local variable emission to delay the choice between emitting the definition attributes or using DW_AT_abstract_definition 2014-06-13 22:18:23 +00:00
cross-cu-linkonce-distinct.ll Recommit r212203: Don't try to construct debug LexicalScopes hierarchy for functions that do not have top level debug information. 2014-07-09 21:02:41 +00:00
cross-cu-linkonce.ll DebugInfo: Test linkonce-odr functions under LTO. 2014-05-26 06:44:52 +00:00
cu-line-tables.ll DebugInfo: Make gmlt debug info more gmlt-like by removing variables. 2014-05-12 21:33:03 +00:00
cu-range-hole.ll Reapply DW_AT_low/high_pc patch: 2014-03-20 19:16:16 +00:00
cu-ranges.ll Reapply DW_AT_low/high_pc patch: 2014-03-20 19:16:16 +00:00
dead-argument-order.ll DebugInfo: Following up to r209677, refactor local variable emission to delay the choice between emitting the definition attributes or using DW_AT_abstract_definition 2014-06-13 22:18:23 +00:00
debug-info-qualifiers.ll DebugInfo: Lazily construct subprogram definition DIEs. 2014-05-27 18:37:48 +00:00
debuginfofinder-multiple-cu.ll Debug Info: update testing cases to specify the debug info version number. 2013-11-22 21:49:45 +00:00
debuglineinfo.test Add DIContext::getLineInfoForAddressRange() function and test. This function allows a caller to obtain a table of line information for a function using the function's address and size. 2013-01-26 00:28:05 +00:00
dwarf-public-names.ll DebugInfo: Use the scope of the function declaration, if any, to name a function in DWARF pubnames 2014-06-06 22:29:05 +00:00
dwarfdump-debug-frame-simple.test Previously, parsing capability of the .debug_frame section was added 2013-02-21 22:53:19 +00:00
dwarfdump-debug-loc-simple.test Spell correct (s/begining/beginning/) 2013-06-19 21:42:05 +00:00
dwarfdump-dump-flags.test Add command-line flags for DWARF dumping. 2013-01-25 20:26:43 +00:00
dwarfdump-line-dwo.test llvm-dwarfdump: Support for debug_line.dwo section for file names for type units under fission. 2014-02-24 23:58:54 +00:00
dwarfdump-pubnames.test DebugInfo: Make pubnames header printing similar to unit header printing 2013-11-01 17:53:30 +00:00
dwarfdump-ranges.test Kill symbolization functionality in llvm-dwarfdump. We have llvm-symbolizer for that. 2014-05-19 18:45:32 +00:00
dwarfdump-type-units.test llvm-dwarfdump: support for emitting only the debug_types section using -debug-dump 2013-11-19 00:29:42 +00:00
dwarfdump-zlib.test Kill symbolization functionality in llvm-dwarfdump. We have llvm-symbolizer for that. 2014-05-19 18:45:32 +00:00
empty.ll DebugInfo: Add fission-related sections to COFF 2014-03-26 03:05:10 +00:00
enum.ll DebugInfo: Remove some unneeded conditionals now that DIBuilder no longer emits zero-length arrays as {i32 0} 2014-02-04 01:23:52 +00:00
global.ll Move test so that it is skipped if the ARM target is not enabled. 2014-06-20 15:30:38 +00:00
incorrect-variable-debugloc.ll DebugInfo: Assert that DbgVariables have associated DIEs 2014-06-01 03:38:13 +00:00
inheritance.ll Debug Info Testing: update context from empty string to null. 2013-09-08 03:11:54 +00:00
inline-debug-info-multiret.ll Debug Info: update testing cases to specify the debug info version number. 2013-11-22 21:49:45 +00:00
inline-debug-info.ll Debug Info: update testing cases to specify the debug info version number. 2013-11-22 21:49:45 +00:00
inline-no-debug-info.ll Improve the test for inlining of __no_debug__ functions. 2014-06-11 08:46:45 +00:00
inline-scopes.ll DebugInfo: Fix inlining with #file directives a little harder 2014-05-25 18:11:35 +00:00
inlined-arguments.ll DebugInfo: Refactor some tests to allow DW_AT_name to not be the first attribute in a local variable. 2014-06-13 21:52:33 +00:00
inlined-vars.ll DwarfDebug: Avoid an extra map lookup while constructing abstract scope DIEs and reduce nesting/conditionals. 2014-05-12 18:23:35 +00:00
llvm-symbolizer-zlib.test Kill symbolization functionality in llvm-dwarfdump. We have llvm-symbolizer for that. 2014-05-19 18:45:32 +00:00
llvm-symbolizer.test [DWARF parser] Fix broken address ranges construction. 2014-06-12 23:58:49 +00:00
lto-comp-dir.ll Add comments from Eric's review of r204094. 2014-03-20 17:05:45 +00:00
member-order.ll DebugInfo: Remove some unneeded conditionals now that DIBuilder no longer emits zero-length arrays as {i32 0} 2014-02-04 01:23:52 +00:00
member-pointers.ll DebugInfo: Remove some unneeded conditionals now that DIBuilder no longer emits zero-length arrays as {i32 0} 2014-02-04 01:23:52 +00:00
missing-abstract-variable.ll XFAIL: test/DebugInfo/missing-abstract-variable.ll on s390x as well 2014-06-05 14:20:54 +00:00
namespace_function_definition.ll DebugInfo: Lazily attach definition attributes to definitions. 2014-05-27 18:37:43 +00:00
namespace_inline_function_definition.ll DebugInfo: Put concrete definitions referencing abstract definitions in the same scope as the abstract definition. 2014-05-23 20:25:15 +00:00
namespace.ll DebugInfo: Lazily construct subprogram definition DIEs. 2014-05-27 18:37:48 +00:00
nodebug.ll Recommit r212203: Don't try to construct debug LexicalScopes hierarchy for functions that do not have top level debug information. 2014-07-09 21:02:41 +00:00
PR20038.ll DebugInfo: Ensure that all debug location scope chains from instructions within a function, lead to the function itself. 2014-07-02 18:32:05 +00:00
restrict.ll PR13337: Omit DW_TAG_restrict_type when compiling for DWARF2 2014-04-12 05:35:59 +00:00
sugared-constants.ll DebugInfo: Handle emitting constants of C++ unicode character type. 2014-05-16 21:53:09 +00:00
template-recursive-void.ll DebugInfo: Remove some unneeded conditionals now that DIBuilder no longer emits zero-length arrays as {i32 0} 2014-02-04 01:23:52 +00:00
tu-composite.ll DebugInfo: Remove some unneeded conditionals now that DIBuilder no longer emits zero-length arrays as {i32 0} 2014-02-04 01:23:52 +00:00
tu-member-pointer.ll DebugInfo: Remove some unneeded conditionals now that DIBuilder no longer emits zero-length arrays as {i32 0} 2014-02-04 01:23:52 +00:00
two-cus-from-same-file.ll DebugInfo: Sure up subprogram variable list handling with more assertions and fewer conditionals. 2014-05-14 21:52:46 +00:00
typedef.ll DebugInfo: Correct the attribute type kind. 2014-05-01 18:31:21 +00:00
unconditional-branch.ll X86MCAsmInfoGNUCOFF: Set PointerSize as 8 for targeting x64. It caused DW_LNE_set_address was misemitted on x64. 2014-04-08 15:28:50 +00:00
varargs.ll DebugInfo: Lazily construct subprogram definition DIEs. 2014-05-27 18:37:48 +00:00
version.ll DebugInfo: Remove some unneeded conditionals now that DIBuilder no longer emits zero-length arrays as {i32 0} 2014-02-04 01:23:52 +00:00