From 832c7d9f36bcb7a99113999439c82390b31919bd Mon Sep 17 00:00:00 2001 From: David Blaikie Date: Wed, 24 Apr 2019 18:09:44 +0000 Subject: 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) llvm-svn: 359122 --- llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h') diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h b/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h index 4d66447ec3a..ea980dfda17 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h @@ -100,6 +100,8 @@ class DwarfCompileUnit final : public DwarfUnit { return DU->getAbstractEntities(); } + void finishNonUnitTypeDIE(DIE& D, const DICompositeType *CTy) override; + public: DwarfCompileUnit(unsigned UID, const DICompileUnit *Node, AsmPrinter *A, DwarfDebug *DW, DwarfFile *DWU); -- cgit v1.2.3