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

Eli Friedman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 7 12:35:54 PST 2018

efriedma added inline comments.

Comment at: lib/CodeGen/MicrosoftCXXABI.cpp:1202
+  SmallVector<VBaseEntry, 4> VBases(VBaseMap.begin(), VBaseMap.end());
+  std::stable_sort(VBases.begin(), VBases.end(),
+                   [](const VBaseEntry &a, const VBaseEntry &b) {
Using stable_sort() here, as opposed to sort(), doesn't do anything useful here; VBaseMap is a DenseMap with a pointer key, so the input is in random order anyway.


More information about the cfe-commits mailing list