[PATCH] D39245: [ADT] Shuffle containers before sorting to uncover non-deterministic behavior

Duncan P. N. Exon Smith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 26 08:48:18 PDT 2017


dexonsmith requested changes to this revision.
dexonsmith added inline comments.
This revision now requires changes to proceed.


================
Comment at: include/llvm/ADT/STLExtras.h:779-782
+#if LLVM_ENABLE_ABI_BREAKING_CHECKS
+  std::mt19937 Generator(std::random_device{}());
+  std::shuffle(Start, End, Generator);
+#endif
----------------
I don't see how toggling these checks would be ABI-breaking, so I think this is the wrong macro to use.


Repository:
  rL LLVM

https://reviews.llvm.org/D39245





More information about the llvm-commits mailing list