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

Nico Weber via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 7 13:53:28 PST 2018


thakis marked an inline comment as done.
thakis added inline comments.


================
Comment at: lib/CodeGen/MicrosoftCXXABI.cpp:1206
+
+  for (const VBase &V : VBases) {
+    if (!V.second.hasVtorDisp())
----------------
rnk wrote:
> 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`.
That's way nicer, thanks. Done.


https://reviews.llvm.org/D44223





More information about the cfe-commits mailing list