From ad56ea31294fd06475b99d0531f94566a1988c90 Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Fri, 1 Jul 2016 22:24:51 +0000 Subject: [codeview] Don't record UDTs for anonymous structs MSVC makes up names for these anonymous structs, but we don't (yet). Eventually Clang should use getTypedefNameForAnonDecl() to put some name in the debug info, and we can update the test case when that happens. llvm-svn: 274391 --- llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp') diff --git a/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp index fa216a3..d567d6a 100644 --- a/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp @@ -873,6 +873,10 @@ void CodeViewDebug::beginFunction(const MachineFunction *MF) { } void CodeViewDebug::addToUDTs(const DIType *Ty, TypeIndex TI) { + // Don't record empty UDTs. + if (Ty->getName().empty()) + return; + SmallVector QualifiedNameComponents; const DISubprogram *ClosestSubprogram = getQualifiedNameComponents( Ty->getScope().resolve(), QualifiedNameComponents); -- cgit v1.1