[PATCH] D37162: [CodeView] Don't output S_UDT records for incomplete typedefs
Reid Kleckner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Aug 26 14:23:05 PDT 2017
rnk accepted this revision.
rnk added a comment.
This revision is now accepted and ready to land.
Yep! Lgtm
================
Comment at: llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp:1106
+ if (const DIDerivedType *DT = dyn_cast<DIDerivedType>(T))
+ return shouldEmitUdt(cast<DIDerivedType>(T)->getBaseType().resolve());
+
----------------
Make this a while loop to avoid recursion when possible.
================
Comment at: llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.h:190
// index and type name.
- std::vector<std::pair<std::string, codeview::TypeIndex>> LocalUDTs,
- GlobalUDTs;
+ std::vector<std::pair<std::string, const DIType *>> LocalUDTs;
+ std::vector<std::pair<std::string, const DIType *>> GlobalUDTs;
----------------
I bet we can simplify this and get rid of the std::string by computing it later, but that seems like a separate patch.
https://reviews.llvm.org/D37162
More information about the llvm-commits
mailing list