]> granicus.if.org Git - llvm/commit
DebugInfo: Emit only declarations (not whole definitions) of non-unit user defined...
authorDavid Blaikie <dblaikie@gmail.com>
Wed, 24 Apr 2019 18:09:44 +0000 (18:09 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Wed, 24 Apr 2019 18:09:44 +0000 (18:09 +0000)
commitd7f88bede7e3f059afaac8897f6e54fd80b7d8e3
treef31b1a61eaf070f11860e8fa4f66b46d45dc420d
parentfc1e1596751f4a4d3cd338e69ae57ac4925d9483
DebugInfo: Emit only declarations (not whole definitions) of non-unit user defined types into type units

While this doesn't come up in reasonable cases currently (the only user
defined types not in type units are ones without linkage - which makes
for near-ODR violations, because it'd be a type with linkage referencing
a type without linkage - such a type can't be validly defined in more
than one TU, so arguably it shouldn't be in a type unit to begin with -
but it's a convenient way to demonstrate an issue that will become more
revalent with homed modular debug info type definitions - which also
don't need to be in type units but more legitimately so).

Precursor to the Clang change to de-type-unit (by omitting the
'identifier') types homed due to strong linkage vtables. (making that
change without this one would lead to major type duplication in type
units)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359122 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
lib/CodeGen/AsmPrinter/DwarfCompileUnit.h
lib/CodeGen/AsmPrinter/DwarfDebug.cpp
lib/CodeGen/AsmPrinter/DwarfDebug.h
lib/CodeGen/AsmPrinter/DwarfUnit.cpp
lib/CodeGen/AsmPrinter/DwarfUnit.h
test/DebugInfo/X86/tu-to-non-tu.ll [new file with mode: 0644]