Skip to content

Commit

Permalink
Remove optional argument and header
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Symalla authored and tsymalla-AMD committed Jul 17, 2024
1 parent 4f95ba4 commit ec8493d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 9 deletions.
3 changes: 0 additions & 3 deletions lib/TableGen/GenDialect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -236,12 +236,9 @@ void llvm_dialects::genDialectDefs(raw_ostream& out, RecordKeeper& records) {
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/IR/InstrTypes.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/Module.h"
#include <optional>
)";

if (!noMemoryEffects()) {
Expand Down
2 changes: 1 addition & 1 deletion lib/TableGen/Operations.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ void AccessorBuilder::emitVarArgReplacementDefinition() const {
if ($index > 0)
newArgs.append(arg_begin(), arg_begin() + $index);
newArgs.append($name.begin(), $name.end());
$_op *newOp = ::llvm::cast<$_op>(::llvm::CallInst::Create(getCalledFunction(), newArgs, ::std::nullopt, this->getName(), this->getIterator()));
$_op *newOp = ::llvm::cast<$_op>(::llvm::CallInst::Create(getCalledFunction(), newArgs, this->getName(), this->getIterator()));
this->replaceAllUsesWith(newOp);
this->eraseFromParent();
return newOp;
Expand Down
7 changes: 2 additions & 5 deletions test/example/generated/ExampleDialect.cpp.inc
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,10 @@
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringExtras.h"

#include "llvm/IR/InstrTypes.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/Module.h"

#include <optional>

#include "llvm/Support/ModRef.h"

#include "llvm/Support/raw_ostream.h"
Expand Down Expand Up @@ -1512,7 +1509,7 @@ instName
if (0 > 0)
newArgs.append(arg_begin(), arg_begin() + 0);
newArgs.append(instName_0.begin(), instName_0.end());
InstNameConflictVarargsOp *newOp = ::llvm::cast<InstNameConflictVarargsOp>(::llvm::CallInst::Create(getCalledFunction(), newArgs, ::std::nullopt, this->getName(), this->getIterator()));
InstNameConflictVarargsOp *newOp = ::llvm::cast<InstNameConflictVarargsOp>(::llvm::CallInst::Create(getCalledFunction(), newArgs, this->getName(), this->getIterator()));
this->replaceAllUsesWith(newOp);
this->eraseFromParent();
return newOp;
Expand Down Expand Up @@ -2253,7 +2250,7 @@ data
if (1 > 0)
newArgs.append(arg_begin(), arg_begin() + 1);
newArgs.append(args.begin(), args.end());
WriteVarArgOp *newOp = ::llvm::cast<WriteVarArgOp>(::llvm::CallInst::Create(getCalledFunction(), newArgs, ::std::nullopt, this->getName(), this->getIterator()));
WriteVarArgOp *newOp = ::llvm::cast<WriteVarArgOp>(::llvm::CallInst::Create(getCalledFunction(), newArgs, this->getName(), this->getIterator()));
this->replaceAllUsesWith(newOp);
this->eraseFromParent();
return newOp;
Expand Down

0 comments on commit ec8493d

Please sign in to comment.