[clang][CodeGen] Use llvm::stable_sort for multi version resolver options
authorAlex Lorenz <arphaman@gmail.com>
Tue, 4 May 2021 03:05:38 +0000 (20:05 -0700)
committerAlex Lorenz <arphaman@gmail.com>
Tue, 4 May 2021 03:07:00 +0000 (20:07 -0700)
commit2669abaecfc47d4d2436559ab8c1fb49ad6e35c3
treea76d9431d64b7fb20508f5619d4ecc4cdc1918a3
parentaa58281979710a1cee6f1635dc1074c4dfc44650
[clang][CodeGen] Use llvm::stable_sort for multi version resolver options

The use of llvm::sort causes periodic failures on the bot with EXPENSIVE_CHECKS enabled,
as the regular sort pre-shuffles the array in the expensive checks mode, leading to a
non-deterministic test result which causes the CodeGenCXX/attr-cpuspecific-outoflinedefs.cpp
testcase to fail on the bot (http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA-expensive/).
clang/lib/CodeGen/CodeGenModule.cpp