[llvm] [CodeGen] Use range-based for loops (NFC) (PR #97467)

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 2 14:39:19 PDT 2024


================
@@ -10236,8 +10236,8 @@ void SelectionDAGBuilder::emitInlineAsmError(const CallBase &Call,
     return;
 
   SmallVector<SDValue, 1> Ops;
-  for (unsigned i = 0, e = ValueVTs.size(); i != e; ++i)
-    Ops.push_back(DAG.getUNDEF(ValueVTs[i]));
+  for (const EVT &VT : ValueVTs)
----------------
MaskRay wrote:

I wondered whether `reserve` is needed, but this is an error case `emitInlineAsmError`, so it doesn't matter

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


More information about the llvm-commits mailing list