rnk accepted this revision. rnk added a comment. This revision is now accepted and ready to land.
Thanks, looks good with some nits ================ Comment at: lib/CodeGen/CGDebugInfo.cpp:1397 const auto *Base = cast<CXXRecordDecl>(BI.getType()->getAs<RecordType>()->getDecl()); ---------------- rnk wrote: > You should be able to use this as the key into SeenTypes. You also want to do > `Base = Base->getCanonicalDecl()`, though, so that we don't end up with > pointers to different redeclarations of the same record. I don't think I can > construct a case where this would matter, but it's probably still worth it. :) So, the playing field shifted. Justin Lebar recently added the CanonicalDeclPtr template, which does the getCanonicalDecl dance for you. Probably best to use that. :) ================ Comment at: lib/CodeGen/CGDebugInfo.cpp:1393-1395 + if (is_contained(SeenTypes, CanonicalBase)) + continue; + SeenTypes.insert(CanonicalBase); ---------------- Now that we've figured out the best way to test set membership, I've realized we can save a hash lookup like this: if (SeenTypes.insert(CanonicalBase).second) continue; https://reviews.llvm.org/D25579 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits