[PATCH] Fix PR17738 - add support for vtordisp thunks when using -cxx-abi microsoft

Reid Kleckner rnk at google.com
Mon Nov 4 11:21:26 PST 2013

Comment at: lib/AST/MicrosoftMangle.cpp:1849
@@ -1848,2 +1848,3 @@
                                       MicrosoftCXXNameMangler &Mangler,
                                       raw_ostream &Out) {
+  if (!Adjustment.Virtual.isEmpty()) {
This is complicated enough that it deserves it's own BNF comment with portions of the mangleFunctionClass() BNF diagram.  The G, O, W and A, I, Q access codes clearly correspond to it.

Comment at: lib/AST/MicrosoftMangle.cpp:390
@@ -389,3 +389,3 @@
-void MicrosoftCXXNameMangler::mangleNumber(int64_t Number) {
-  llvm::APSInt APSNumber(/*BitWidth=*/64, /*isUnsigned=*/false);
+void MicrosoftCXXNameMangler::mangleNumber(uint32_t Number) {
+  llvm::APSInt APSNumber(/*BitWidth=*/32, /*isUnsigned=*/true);
Sure, this seems reasonable.

Comment at: include/clang/Basic/ABI.h:111
@@ +110,3 @@
+  /// adjustment, if needed.
+  union VirtualAdjustment {
+    // Itanium ABI
I'm still not really totally comfortable with the unionification of this stuff.  We should ask John what he thinks the right design is for this stuff.  This is consistent with what's already been committed, but we should probably figure out the right way to do this going forward.


More information about the cfe-commits mailing list