[PATCH] [ms-cxxabi] Improve vbtable name mangling accuracy
David Majnemer
david.majnemer at gmail.com
Fri Jan 3 14:13:00 PST 2014
LGTM.
================
Comment at: include/clang/AST/VTableBuilder.h:420
@@ -417,1 +419,3 @@
+ // FIXME: Uncomment when we've moved to C++11.
+ //VBTableInfo(const VBTableInfo &) = default;
----------------
Shame we don't have `LLVM_DEFAULTED_FUNCTION` :/
================
Comment at: lib/AST/VTableBuilder.cpp:3183
@@ -3181,2 +3182,3 @@
-namespace {
+static bool setsIntersect(const llvm::SmallPtrSet<const CXXRecordDecl *, 4> &A,
+ const llvm::ArrayRef<const CXXRecordDecl *> &B) {
----------------
Shame we don't have a `SmallPtrSetRef` :/
================
Comment at: lib/AST/VTableBuilder.cpp:3254
@@ +3253,3 @@
+ // wasn't already extended with Base.
+ if (P->MangledPath.empty() || P->MangledPath.back() != Base)
+ P->NextBaseToMangle = Base;
----------------
This check seems fine but is `P->MangledPath.back() == Base` truly possible?
================
Comment at: lib/AST/VTableBuilder.cpp:3285
@@ -3349,3 +3284,3 @@
-static bool pathCompare(VBTablePath *LHS, VBTablePath *RHS) {
- return LHS->VBInfo.MangledPath < RHS->VBInfo.MangledPath;
+static bool pathCompare(VBTableInfo *LHS, VBTableInfo *RHS) {
+ return LHS->MangledPath < RHS->MangledPath;
----------------
`LHS` and `RHS` could be `const`.
http://llvm-reviews.chandlerc.com/D2509
More information about the cfe-commits
mailing list