File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -150,7 +150,7 @@ class Writer {
150150 token |= ENCODE_D3D10_SB_OPERAND_4_COMPONENT_MASK (*mask);
151151 } else if (auto swizzle = op.getSwizzle ()) {
152152 SmallVector<uint32_t , 4 > values;
153- for (APInt v : *swizzle) {
153+ for (const APInt & v : *swizzle) {
154154 values.push_back (v.getZExtValue ());
155155 }
156156 if (values.size () != 4 ) {
@@ -244,7 +244,7 @@ class Writer {
244244 // encoded as is, and 64 bit immediates are split into high and
245245 // low 32 bit parts.
246246 SmallVector<uint32_t , 4 > values;
247- for (APInt v : attr) {
247+ for (const APInt & v : attr) {
248248 uint64_t bits = v.getZExtValue ();
249249 if (v.getBitWidth () == 64 ) {
250250 values.push_back (bits >> 32 );
@@ -264,9 +264,7 @@ class Writer {
264264 }
265265
266266 buffer.push_back (token);
267- for (uint32_t v : values) {
268- buffer.push_back (v);
269- }
267+ llvm::append_range (buffer, values);
270268
271269 return success ();
272270 }
You can’t perform that action at this time.
0 commit comments