summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
diff options
context:
space:
mode:
authorReid Kleckner <rnk@google.com>2016-07-01 22:24:51 +0000
committerReid Kleckner <rnk@google.com>2016-07-01 22:24:51 +0000
commitad56ea31294fd06475b99d0531f94566a1988c90 (patch)
tree75ab8f90bad175f1011d523337b93b343ca16962 /llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
parent0efaa349e4499f5d7046a1691b6daa9b5fc683bc (diff)
downloadbcm5719-llvm-ad56ea31294fd06475b99d0531f94566a1988c90.tar.gz
bcm5719-llvm-ad56ea31294fd06475b99d0531f94566a1988c90.zip
[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
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
index fa216a32f2f..d567d6a87cb 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<StringRef, 5> QualifiedNameComponents;
const DISubprogram *ClosestSubprogram = getQualifiedNameComponents(
Ty->getScope().resolve(), QualifiedNameComponents);
OpenPOWER on IntegriCloud