remove use of SmallVector from Path::makeUnique. Path::makeUnique
[oota-llvm.git] / lib / CodeGen / MachineModuleInfoImpls.cpp
index 10de1deec4e70e123025a9e8ea5accbc6c30cefb..7a6292910f4b5f666a504eb03b4d03901eeb94d1 100644 (file)
@@ -38,7 +38,8 @@ MachineModuleInfoMachO::SymbolListTy
 MachineModuleInfoMachO::GetSortedStubs(const DenseMap<const MCSymbol*, 
                                                       const MCSymbol*> &Map) {
   MachineModuleInfoMachO::SymbolListTy List(Map.begin(), Map.end());
-  qsort(&List[0], List.size(), sizeof(List[0]), SortSymbolPair);
+  if (!List.empty())
+    qsort(&List[0], List.size(), sizeof(List[0]), SortSymbolPair);
   return List;
 }