Skip to content

Commit f168f83

Browse files
committed
Fix up warnings
Change use of ArrayRef into {} Change deprecated getValues into getElements
1 parent 92d0677 commit f168f83

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

lib/TableGen/Operations.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ void OperationBase::parseValueTraits(raw_ostream &errs, RecordTy *record,
322322
}
323323

324324
const ListInit *List = record->getValueAsListInit("value_traits");
325-
for (const Init *I : List->getValues()) {
325+
for (const Init *I : List->getElements()) {
326326
if (const DagInit *DI = dyn_cast<DagInit>(I)) {
327327
if (DI->getNumArgs() != 1) {
328328
errs << "value_traits " << *DI << " is missing argument name";
@@ -840,7 +840,7 @@ void BuilderMethod::emitDefinition(raw_ostream &out, FmtContext &fmt,
840840
)",
841841
&fmt);
842842
} else {
843-
out << tgfmt("return ::llvm::cast<$_op>($_builder.CreateCall($fn, std::nullopt, $_instname));\n",
843+
out << tgfmt("return ::llvm::cast<$_op>($_builder.CreateCall($fn, {}, $_instname));\n",
844844
&fmt);
845845
}
846846

test/example/generated/ExampleDialect.cpp.inc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1007,7 +1007,7 @@ source
10071007
assert(fn.getFunctionType() == fnType);
10081008
assert(::llvm::cast<::llvm::Function>(fn.getCallee())->getFunctionType() == fn.getFunctionType());
10091009

1010-
return ::llvm::cast<HandleGetOp>(b.CreateCall(fn, std::nullopt, instName));
1010+
return ::llvm::cast<HandleGetOp>(b.CreateCall(fn, {}, instName));
10111011
}
10121012

10131013

@@ -1692,7 +1692,7 @@ instName
16921692
assert(fn.getFunctionType() == fnType);
16931693
assert(::llvm::cast<::llvm::Function>(fn.getCallee())->getFunctionType() == fn.getFunctionType());
16941694

1695-
return ::llvm::cast<NoDescriptionOp>(b.CreateCall(fn, std::nullopt, instName));
1695+
return ::llvm::cast<NoDescriptionOp>(b.CreateCall(fn, {}, instName));
16961696
}
16971697

16981698

@@ -1743,7 +1743,7 @@ instName
17431743
assert(fn.getFunctionType() == fnType);
17441744
assert(::llvm::cast<::llvm::Function>(fn.getCallee())->getFunctionType() == fn.getFunctionType());
17451745

1746-
return ::llvm::cast<NoSummaryOp>(b.CreateCall(fn, std::nullopt, instName));
1746+
return ::llvm::cast<NoSummaryOp>(b.CreateCall(fn, {}, instName));
17471747
}
17481748

17491749

@@ -1797,7 +1797,7 @@ instName
17971797
assert(fn.getFunctionType() == fnType);
17981798
assert(::llvm::cast<::llvm::Function>(fn.getCallee())->getFunctionType() == fn.getFunctionType());
17991799

1800-
return ::llvm::cast<ReadOp>(b.CreateCall(fn, std::nullopt, instName));
1800+
return ::llvm::cast<ReadOp>(b.CreateCall(fn, {}, instName));
18011801
}
18021802

18031803

@@ -1854,7 +1854,7 @@ instName
18541854
assert(fn.getFunctionType() == fnType);
18551855
assert(::llvm::cast<::llvm::Function>(fn.getCallee())->getFunctionType() == fn.getFunctionType());
18561856

1857-
return ::llvm::cast<SetReadOp>(b.CreateCall(fn, std::nullopt, instName));
1857+
return ::llvm::cast<SetReadOp>(b.CreateCall(fn, {}, instName));
18581858
}
18591859

18601860

0 commit comments

Comments
 (0)