[PATCH] MS ABI: Fix vftable mangling by using the vbtable name algorithm

Timur Iskhodzhanov timurrrr at google.com
Thu Feb 27 05:09:11 PST 2014


  LGTM with nits


================
Comment at: include/clang/AST/VTableBuilder.h:371
@@ +370,3 @@
+/// table pointer.  A record may contain as many vptrs as there are base
+/// subobjects.
+struct VPtrInfo {
----------------
Wait, a record can contain up to twice as many, no?

================
Comment at: include/clang/AST/VTableBuilder.h:392
@@ -430,3 +391,3 @@
 
-  /// The vbptr is stored inside this subobject.
-  const CXXRecordDecl *BaseWithVBPtr;
+  /// The vptr is stored inside this subobject.
+  const CXXRecordDecl *BaseWithVPtr;
----------------
Are there any corner-cases when we have e.g. two bases of the same type?
After all, there's a `BaseSubobject` type which also holds the offset.

Can/should we merge `NonVirtualOffset` and `BaseWithVPtr` into one `BaseSubobject`?
See also `BaseOffset`

================
Comment at: include/clang/AST/VTableBuilder.h:413
@@ +412,3 @@
+  /// vftables.
+  BasePath PathToBaseWithVPtr;
+
----------------
...WithVFPtr maybe?


http://llvm-reviews.chandlerc.com/D2893

BRANCH
  mangle-vftables

ARCANIST PROJECT
  clang



More information about the cfe-commits mailing list