mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-14 07:31:47 +00:00
MergeFunc: Quick fix for r245140, Ignore second, aka Function*, in sorting.
Don't assume second would be ordered in the module. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@245168 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
c118a5970b
commit
00225dcc22
@ -1316,7 +1316,12 @@ bool MergeFunctions::runOnModule(Module &M) {
|
||||
}
|
||||
}
|
||||
|
||||
std::sort(HashedFuncs.begin(), HashedFuncs.end());
|
||||
std::stable_sort(
|
||||
HashedFuncs.begin(), HashedFuncs.end(),
|
||||
[](const std::pair<FunctionComparator::FunctionHash, Function *> &a,
|
||||
const std::pair<FunctionComparator::FunctionHash, Function *> &b) {
|
||||
return a.first < b.first;
|
||||
});
|
||||
|
||||
auto S = HashedFuncs.begin();
|
||||
for (auto I = HashedFuncs.begin(), IE = HashedFuncs.end(); I != IE; ++I) {
|
||||
|
Loading…
Reference in New Issue
Block a user