[Mlir-commits] [mlir] 52e3f3d - [mlir] Use llvm::make_first_range (NFC) (#135900)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Tue Apr 15 23:17:36 PDT 2025


Author: Kazu Hirata
Date: 2025-04-15T23:17:33-07:00
New Revision: 52e3f3d68cbabf81c4c118cfb823828f03b712c4

URL: https://github.com/llvm/llvm-project/commit/52e3f3d68cbabf81c4c118cfb823828f03b712c4
DIFF: https://github.com/llvm/llvm-project/commit/52e3f3d68cbabf81c4c118cfb823828f03b712c4.diff

LOG: [mlir] Use llvm::make_first_range (NFC) (#135900)

Added: 
    

Modified: 
    mlir/lib/Bytecode/Reader/BytecodeReader.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Bytecode/Reader/BytecodeReader.cpp b/mlir/lib/Bytecode/Reader/BytecodeReader.cpp
index 0f2057cb32ff1..1052946d4550b 100644
--- a/mlir/lib/Bytecode/Reader/BytecodeReader.cpp
+++ b/mlir/lib/Bytecode/Reader/BytecodeReader.cpp
@@ -1984,8 +1984,7 @@ LogicalResult BytecodeReader::Impl::sortUseListOrder(Value value) {
     // If the bytecode file did not contain any custom use-list order, it means
     // that the order was descending useID. Hence, shuffle by the first index
     // of the `currentOrder` pair.
-    SmallVector<unsigned> shuffle = SmallVector<unsigned>(
-        llvm::map_range(currentOrder, [&](auto item) { return item.first; }));
+    SmallVector<unsigned> shuffle(llvm::make_first_range(currentOrder));
     value.shuffleUseList(shuffle);
     return success();
   }


        


More information about the Mlir-commits mailing list