Revert "DebugInfo: Don't put types in type units if they reference internal linkage...
authorDavid Blaikie <dblaikie@gmail.com>
Tue, 1 Feb 2022 02:27:39 +0000 (18:27 -0800)
committerDavid Blaikie <dblaikie@gmail.com>
Wed, 2 Feb 2022 00:13:07 +0000 (16:13 -0800)
commitf69f23396d32c95dacf3765bc63af02b23ccff3e
tree3d543be388d29aec45658770830777442db8b8a9
parentd7dd7ad827a0a78314f3c9b55f4778a6059840f3
Revert "DebugInfo: Don't put types in type units if they reference internal linkage types"

This reverts commit ab4756338c5b2216d52d9152b2f7e65f233c4dac.

Breaks some cases, including this:

namespace {
template <typename> struct a {};
} // namespace
class c {
  c();
};
class b {
  b();
  a<c> ax;
};
b::b() {}
c::c() {}

By producing a reference to a type unit for "c" but not producing the type unit.
llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h
llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
llvm/test/DebugInfo/X86/tu-to-non-tu.ll