diff options
Diffstat (limited to 'llvm/utils/TableGen/Basic')
-rw-r--r-- | llvm/utils/TableGen/Basic/RuntimeLibcallsEmitter.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/llvm/utils/TableGen/Basic/RuntimeLibcallsEmitter.cpp b/llvm/utils/TableGen/Basic/RuntimeLibcallsEmitter.cpp index 7f90d6b..a280604 100644 --- a/llvm/utils/TableGen/Basic/RuntimeLibcallsEmitter.cpp +++ b/llvm/utils/TableGen/Basic/RuntimeLibcallsEmitter.cpp @@ -242,11 +242,10 @@ public: SmallVector<const Record *, 1024> AllRuntimeLibcallImpls( AllRuntimeLibcallImplsRaw); - // Sort by libcall impl name, not the enum name. This keeps the order - // suitable for using the name table for libcall recognition binary search. - llvm::sort(AllRuntimeLibcallImpls, [](const Record *A, const Record *B) { - return A->getValueAsString("LibCallFuncName") < - B->getValueAsString("LibCallFuncName"); + // Sort by libcall impl name and secondarily by the enum name. + sort(AllRuntimeLibcallImpls, [](const Record *A, const Record *B) { + return std::pair(A->getValueAsString("LibCallFuncName"), A->getName()) < + std::pair(B->getValueAsString("LibCallFuncName"), B->getName()); }); RuntimeLibcallImplDefList.reserve(AllRuntimeLibcallImpls.size()); |