[llvm] [NFC] Use references to avoid copying (PR #110462)

Malay Sanghi via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 30 01:07:38 PDT 2024


================
@@ -255,7 +255,7 @@ void IntrinsicEmitter::EmitIntrinsicToOverloadTable(
 static constexpr uint8_t OTable[] = {
   0
   )";
-  for (auto [I, Int] : enumerate(Ints)) {
+  for (const auto& [I, Int] : enumerate(Ints)) {
----------------
MalaySanghi wrote:

enumerate already provides a reference.

https://github.com/llvm/llvm-project/pull/110462


More information about the llvm-commits mailing list