[PATCH] D44223: [ms] Emit vtordisp initializers in a deterministic order.

Reid Kleckner via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 7 13:20:18 PST 2018


rnk added a comment.

Thanks for investigating!



================
Comment at: lib/CodeGen/MicrosoftCXXABI.cpp:1206
+
+  for (const VBase &V : VBases) {
+    if (!V.second.hasVtorDisp())
----------------
I think we can avoid the sort altogether if we iterate `RD->vbases()`, which should already be in layout order, and then do lookup into `VBaseMap`.


https://reviews.llvm.org/D44223





More information about the cfe-commits mailing list