Differential Revision: http://reviews.llvm.org/D15804
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@259031
91177308-0d34-0410-b5e6-
96231b3b80d8
assert(LOffs.first == ROffs.first);
return false;
}
+ bool LIsScratch = strcmp("<scratch space>", LB) == 0;
+ bool RIsScratch = strcmp("<scratch space>", RB) == 0;
+ // Sort scratch after inline asm, but before the rest.
+ if (LIsScratch || RIsScratch) {
+ if (LIsScratch != RIsScratch)
+ return LIsScratch;
+ return LOffs.second < ROffs.second;
+ }
llvm_unreachable("Unsortable locations found");
}