From 352fcfc69788093b50971a9f5540a61fa0887ce1 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Sun, 17 Jan 2021 10:39:45 -0800 Subject: [llvm] Use llvm::sort (NFC) --- llvm/lib/Bitcode/Writer/BitcodeWriter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriter.cpp') diff --git a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp index 9f62cce..4d886f7 100644 --- a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp +++ b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp @@ -3830,7 +3830,7 @@ void ModuleBitcodeWriterBase::writeModuleLevelReferences( NameVals.push_back(VE.getValueID(RI.getValue())); // Sort the refs for determinism output, the vector returned by FS->refs() has // been initialized from a DenseSet. - llvm::sort(NameVals.begin() + SizeBeforeRefs, NameVals.end()); + llvm::sort(drop_begin(NameVals, SizeBeforeRefs)); if (VTableFuncs.empty()) Stream.EmitRecord(bitc::FS_PERMODULE_GLOBALVAR_INIT_REFS, NameVals, -- cgit v1.1