| Index: src/IceGlobalContext.cpp
|
| diff --git a/src/IceGlobalContext.cpp b/src/IceGlobalContext.cpp
|
| index 1bcb85737c5bf01ca1234a4fd85f0665c20cf994..0a426c7b67606204917cadde5e3fec779ac44320 100644
|
| --- a/src/IceGlobalContext.cpp
|
| +++ b/src/IceGlobalContext.cpp
|
| @@ -881,20 +881,19 @@ ConstantList GlobalContext::getConstantExternSyms() {
|
| JumpTableDataList GlobalContext::getJumpTables() {
|
| JumpTableDataList JumpTables(*getJumpTableList());
|
| if (getFlags().shouldReorderPooledConstants()) {
|
| - // If reorder-pooled-constants option is set to true, we need to shuffle the
|
| - // constant pool before emitting it.
|
| - RandomShuffle(JumpTables.begin(), JumpTables.end(), [this](uint64_t N) {
|
| - return (uint32_t)getRNG().next(N);
|
| - });
|
| + // If reorder-pooled-constants option is set to true, we need to shuffle the
|
| + // constant pool before emitting it.
|
| + RandomShuffle(JumpTables.begin(), JumpTables.end(),
|
| + [this](uint64_t N) { return (uint32_t)getRNG().next(N); });
|
| } else {
|
| // Make order deterministic by sorting into functions and then ID of the
|
| // jump table within that function.
|
| - std::sort(JumpTables.begin(), JumpTables.end(), [](const JumpTableData &A,
|
| - const JumpTableData &B) {
|
| - if (A.getFunctionName() != B.getFunctionName())
|
| - return A.getFunctionName() < B.getFunctionName();
|
| - return A.getId() < B.getId();
|
| - });
|
| + std::sort(JumpTables.begin(), JumpTables.end(),
|
| + [](const JumpTableData &A, const JumpTableData &B) {
|
| + if (A.getFunctionName() != B.getFunctionName())
|
| + return A.getFunctionName() < B.getFunctionName();
|
| + return A.getId() < B.getId();
|
| + });
|
| }
|
| return JumpTables;
|
| }
|
|
|