diff options
author | Reid Kleckner <rnk@google.com> | 2016-07-01 22:24:51 +0000 |
---|---|---|
committer | Reid Kleckner <rnk@google.com> | 2016-07-01 22:24:51 +0000 |
commit | ad56ea31294fd06475b99d0531f94566a1988c90 (patch) | |
tree | 75ab8f90bad175f1011d523337b93b343ca16962 /llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp | |
parent | 0efaa349e4499f5d7046a1691b6daa9b5fc683bc (diff) | |
download | bcm5719-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.cpp | 4 |
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); |