Skip to content

Commit ec8493d

Browse files
Thomas Symallatsymalla-AMD
Thomas Symalla
authored andcommitted
Remove optional argument and header
1 parent 4f95ba4 commit ec8493d

File tree

3 files changed

+3
-9
lines changed

3 files changed

+3
-9
lines changed

lib/TableGen/GenDialect.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -236,12 +236,9 @@ void llvm_dialects::genDialectDefs(raw_ostream& out, RecordKeeper& records) {
236236
#include "llvm/ADT/SmallString.h"
237237
#include "llvm/ADT/SmallVector.h"
238238
#include "llvm/ADT/StringExtras.h"
239-
240239
#include "llvm/IR/InstrTypes.h"
241240
#include "llvm/IR/Instructions.h"
242241
#include "llvm/IR/Module.h"
243-
244-
#include <optional>
245242
)";
246243

247244
if (!noMemoryEffects()) {

lib/TableGen/Operations.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ void AccessorBuilder::emitVarArgReplacementDefinition() const {
247247
if ($index > 0)
248248
newArgs.append(arg_begin(), arg_begin() + $index);
249249
newArgs.append($name.begin(), $name.end());
250-
$_op *newOp = ::llvm::cast<$_op>(::llvm::CallInst::Create(getCalledFunction(), newArgs, ::std::nullopt, this->getName(), this->getIterator()));
250+
$_op *newOp = ::llvm::cast<$_op>(::llvm::CallInst::Create(getCalledFunction(), newArgs, this->getName(), this->getIterator()));
251251
this->replaceAllUsesWith(newOp);
252252
this->eraseFromParent();
253253
return newOp;

test/example/generated/ExampleDialect.cpp.inc

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,10 @@
1212
#include "llvm/ADT/SmallString.h"
1313
#include "llvm/ADT/SmallVector.h"
1414
#include "llvm/ADT/StringExtras.h"
15-
1615
#include "llvm/IR/InstrTypes.h"
1716
#include "llvm/IR/Instructions.h"
1817
#include "llvm/IR/Module.h"
1918

20-
#include <optional>
21-
2219
#include "llvm/Support/ModRef.h"
2320

2421
#include "llvm/Support/raw_ostream.h"
@@ -1512,7 +1509,7 @@ instName
15121509
if (0 > 0)
15131510
newArgs.append(arg_begin(), arg_begin() + 0);
15141511
newArgs.append(instName_0.begin(), instName_0.end());
1515-
InstNameConflictVarargsOp *newOp = ::llvm::cast<InstNameConflictVarargsOp>(::llvm::CallInst::Create(getCalledFunction(), newArgs, ::std::nullopt, this->getName(), this->getIterator()));
1512+
InstNameConflictVarargsOp *newOp = ::llvm::cast<InstNameConflictVarargsOp>(::llvm::CallInst::Create(getCalledFunction(), newArgs, this->getName(), this->getIterator()));
15161513
this->replaceAllUsesWith(newOp);
15171514
this->eraseFromParent();
15181515
return newOp;
@@ -2253,7 +2250,7 @@ data
22532250
if (1 > 0)
22542251
newArgs.append(arg_begin(), arg_begin() + 1);
22552252
newArgs.append(args.begin(), args.end());
2256-
WriteVarArgOp *newOp = ::llvm::cast<WriteVarArgOp>(::llvm::CallInst::Create(getCalledFunction(), newArgs, ::std::nullopt, this->getName(), this->getIterator()));
2253+
WriteVarArgOp *newOp = ::llvm::cast<WriteVarArgOp>(::llvm::CallInst::Create(getCalledFunction(), newArgs, this->getName(), this->getIterator()));
22572254
this->replaceAllUsesWith(newOp);
22582255
this->eraseFromParent();
22592256
return newOp;

0 commit comments

Comments
 (0)