aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-08-28 21:38:24 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-08-28 21:38:24 +0000
commit0660bcda5369a76474823eca451f4ecb58433ef7 (patch)
tree4bdbcd04c72f5e983b64c0b3c24f800d6e282d52 /clang/lib/CodeGen/CodeGenModule.cpp
parent51d4690b6e660a16d616cf1f724130483c09640a (diff)
downloadllvm-0660bcda5369a76474823eca451f4ecb58433ef7.zip
llvm-0660bcda5369a76474823eca451f4ecb58433ef7.tar.gz
llvm-0660bcda5369a76474823eca451f4ecb58433ef7.tar.bz2
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. llvm-svn: 246333
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
0 files changed, 0 insertions, 0 deletions