Skip to content

Commit 42419dc

Browse files
authored
fix build for llvm-14 (rust-lang#722)
1 parent 67781b5 commit 42419dc

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

enzyme/Enzyme/InstructionBatcher.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,8 +229,11 @@ class InstructionBatcher : public llvm::InstVisitor<InstructionBatcher> {
229229

230230
SmallVector<Value *, 4> args;
231231
SmallVector<BATCH_TYPE, 4> arg_types;
232-
232+
#if LLVM_VERSION_MAJOR >= 14
233+
for (unsigned j = 0; j < call.arg_size(); ++j) {
234+
#else
233235
for (unsigned j = 0; j < call.getNumArgOperands(); ++j) {
236+
#endif
234237
Value *op = call.getArgOperand(j);
235238

236239
if (toVectorize.count(op) != 0) {

0 commit comments

Comments
 (0)