diff options
Diffstat (limited to 'llvm/lib/CodeGen/StackColoring.cpp')
-rw-r--r-- | llvm/lib/CodeGen/StackColoring.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/StackColoring.cpp b/llvm/lib/CodeGen/StackColoring.cpp index 30e70660cda..641b54205d6 100644 --- a/llvm/lib/CodeGen/StackColoring.cpp +++ b/llvm/lib/CodeGen/StackColoring.cpp @@ -1220,11 +1220,12 @@ bool StackColoring::runOnMachineFunction(MachineFunction &Func) { // Sort the slots according to their size. Place unused slots at the end. // Use stable sort to guarantee deterministic code generation. - std::stable_sort(SortedSlots.begin(), SortedSlots.end(), - [this](int LHS, int RHS) { + llvm::stable_sort(SortedSlots, [this](int LHS, int RHS) { // We use -1 to denote a uninteresting slot. Place these slots at the end. - if (LHS == -1) return false; - if (RHS == -1) return true; + if (LHS == -1) + return false; + if (RHS == -1) + return true; // Sort according to size. return MFI->getObjectSize(LHS) > MFI->getObjectSize(RHS); }); |