mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-28 22:24:28 +00:00
Don't sort the vector when it is empty. This should fix some expensive checking
failures. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82040 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -38,6 +38,7 @@ MachineModuleInfoMachO::SymbolListTy
|
|||||||
MachineModuleInfoMachO::GetSortedStubs(const DenseMap<const MCSymbol*,
|
MachineModuleInfoMachO::GetSortedStubs(const DenseMap<const MCSymbol*,
|
||||||
const MCSymbol*> &Map) {
|
const MCSymbol*> &Map) {
|
||||||
MachineModuleInfoMachO::SymbolListTy List(Map.begin(), Map.end());
|
MachineModuleInfoMachO::SymbolListTy List(Map.begin(), Map.end());
|
||||||
|
if (!List.empty())
|
||||||
qsort(&List[0], List.size(), sizeof(List[0]), SortSymbolPair);
|
qsort(&List[0], List.size(), sizeof(List[0]), SortSymbolPair);
|
||||||
return List;
|
return List;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user