llvm/test/DebugInfo
Duncan P. N. Exon Smith 155b4af95d AsmPrinter: Allow null subroutine type
Currently the DWARF backend requires that subprograms have a type, and
the type is ignored if it has an empty type array.  The long term
direction here -- see PR23079 -- is instead to skip the type entirely if
there's no valid type.

It turns out we have cases in tree of missing types on subprograms, but
since they're not referenced by compile units, the backend never crashes
on them.  One option would be to add a Verifier check that subprograms
have types, and fix the bitrot.  However, this is a fair bit of churn
(20-30 testcases) that would be reversed anyway by PR23079.

I found this inconsistency because of a WIP patch and upgrade script for
PR23367 that started crashing on test/DebugInfo/2010-10-01-crash.ll.
This commit updates the testcase to reference the subprogram from the
compile unit, and fixes the resulting crash (in line with the direction
of PR23079).  This also updates `DIBuilder` to stop assuming a non-null
pointer for the subroutine types.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246333 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-28 21:38:24 +00:00
..
AArch64 DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
ARM DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
COFF DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
Inputs DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
Mips DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
PDB [llvm-pdbdump] Display full enum definitions. 2015-03-04 06:09:53 +00:00
PowerPC DI: Disallow uniquable DICompileUnits 2015-08-03 17:26:41 +00:00
Sparc DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
SystemZ DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
X86 DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
2009-10-16-Phi.ll IR: Make metadata typeless in assembly 2014-12-15 19:07:53 +00:00
2009-11-03-InsertExtractValue.ll DI: Disallow uniquable DICompileUnits 2015-08-03 17:26:41 +00:00
2009-11-05-DeadGlobalVariable.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
2009-11-06-NamelessGlobalVariable.ll DI: Disallow uniquable DICompileUnits 2015-08-03 17:26:41 +00:00
2009-11-10-CurrentFn.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
2010-01-05-DbgScope.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
2010-03-12-llc-crash.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
2010-03-19-DbgDeclare.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
2010-03-24-MemberFn.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
2010-04-06-NestedFnDbgInfo.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
2010-04-19-FramePtr.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
2010-05-03-DisableFramePtr.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
2010-05-03-OriginDIE.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
2010-05-10-MultipleCU.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
2010-06-29-InlinedFnLocalVar.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
2010-07-19-Crash.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
2010-10-01-crash.ll AsmPrinter: Allow null subroutine type 2015-08-28 21:38:24 +00:00
accel-table-hash-collisions.ll DI: Disallow uniquable DICompileUnits 2015-08-03 17:26:41 +00:00
arm-relocs.test Add support for the R_ARM_ABS32 relocation. 2014-04-03 02:27:00 +00:00
array.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
block-asan.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
bug_null_debuginfo.ll DI: Disallow uniquable DICompileUnits 2015-08-03 17:26:41 +00:00
constant-pointers.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
constant-sdnodes-have-dbg-location.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
constantfp-sdnodes-have-dbg-location.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
cross-cu-inlining.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
cross-cu-linkonce-distinct.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
cross-cu-linkonce.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
cu-range-hole.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
cu-ranges.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
dead-argument-order.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
debug-info-always-inline.ll IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
debug-info-qualifiers.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
debuginfofinder-forward-declaration.ll DI: Disallow uniquable DICompileUnits 2015-08-03 17:26:41 +00:00
debuginfofinder-multiple-cu.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
debuglineinfo-macho.test [DWARF] Fix a bug in line info handling 2015-05-31 23:37:04 +00:00
debuglineinfo.test [DWARF] Fix a bug in line info handling 2015-05-31 23:37:04 +00:00
dwarf-public-names.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
dwarfdump-64-bit-dwarf.test DebugInfo: .debug_line DWARF64 support 2015-05-28 15:38:17 +00:00
dwarfdump-accel.test Fix a bunch of trivial cases of 'CHECK[^:]*$' in the tests. NFCI 2015-08-10 19:01:27 +00:00
dwarfdump-debug-frame-simple.test [dwarfdump] Make debug_frame dump actually useful. 2015-02-25 21:30:22 +00:00
dwarfdump-debug-loc-simple.test Spell correct (s/begining/beginning/) 2013-06-19 21:42:05 +00:00
dwarfdump-dump-flags.test [dwarfdump] Ignore scattered relocations for mach-o. 2015-07-31 20:22:50 +00:00
dwarfdump-invalid.test Make llvm-dwarfdump exit with non-zero exit code if error was occured. 2015-06-25 23:40:15 +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-macho-relocs.test [dwarfdump] Do not apply relocations in mach-o files if there is no LoadedObjectInfo. 2015-08-23 04:44:21 +00:00
dwarfdump-macho-universal.test Don't use test inputs from other directories. 2015-08-03 11:59:45 +00:00
dwarfdump-objc.test [dwarfdump] Prettyprint DW_AT_APPLE_property_attribute bitfield values. 2014-10-10 15:51:10 +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 [dwarfdump] Dump DW_AT_ranges values inline in the debug_info dump. 2014-10-23 04:08:34 +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 DI: Disallow uniquable DICompileUnits 2015-08-03 17:26:41 +00:00
enum-types.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
enum.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
global.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
gmlt.test test: XFAIL the non-darwin gmlt test on darwin 2014-10-01 05:45:45 +00:00
gvn.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
incorrect-variable-debugloc1.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
incorrect-variable-debugloc.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
inheritance.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
inline-debug-info-multiret.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
inline-debug-info.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
inline-no-debug-info.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
inline-scopes.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
inlined-arguments.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
inlined-vars.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
lit.local.cfg Update test suite to make "ninja check" succeed without native backend builtin 2015-08-04 06:32:54 +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 Remove "REQUIRES:shell" from tests. They work for me. 2014-11-04 13:41:33 +00:00
location-verifier.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
lto-comp-dir.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
member-order.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
member-pointers.ll DI: Disallow uniquable DICompileUnits 2015-08-03 17:26:41 +00:00
member-pointers.o Revert "Revert "DI: Fold constant arguments into a single MDString"" 2014-10-03 20:01:09 +00:00
missing-abstract-variable.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
missing-abstract-variable.o Revert "Revert "DI: Fold constant arguments into a single MDString"" 2014-10-03 20:01:09 +00:00
multiline.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
namespace_function_definition.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
namespace_inline_function_definition.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
namespace.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
nodebug.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
piece-verifier.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
PR20038.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
restrict.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
sugared-constants.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
template-recursive-void.ll DI: Disallow uniquable DICompileUnits 2015-08-03 17:26:41 +00:00
tu-composite.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
tu-member-pointer.ll DI: Disallow uniquable DICompileUnits 2015-08-03 17:26:41 +00:00
two-cus-from-same-file.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
typedef.ll DI: Disallow uniquable DICompileUnits 2015-08-03 17:26:41 +00:00
unconditional-branch.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
varargs.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00
version.ll DI: Require subprogram definitions to be distinct 2015-08-28 20:26:49 +00:00