diff --git a/lib/TableGen/Operations.cpp b/lib/TableGen/Operations.cpp index 93428ef..76acb18 100644 --- a/lib/TableGen/Operations.cpp +++ b/lib/TableGen/Operations.cpp @@ -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 = cast<$_op>(::llvm::CallInst::Create(getCalledFunction(), newArgs, ::std::nullopt, this->getName(), this->getIterator())); + $_op *newOp = ::llvm::cast<$_op>(::llvm::CallInst::Create(getCalledFunction(), newArgs, ::std::nullopt, this->getName(), this->getIterator())); this->replaceAllUsesWith(newOp); this->eraseFromParent(); return newOp; diff --git a/test/example/generated/ExampleDialect.cpp.inc b/test/example/generated/ExampleDialect.cpp.inc index 43c25b3..bddf329 100644 --- a/test/example/generated/ExampleDialect.cpp.inc +++ b/test/example/generated/ExampleDialect.cpp.inc @@ -1508,7 +1508,7 @@ instName if (0 > 0) newArgs.append(arg_begin(), arg_begin() + 0); newArgs.append(instName_0.begin(), instName_0.end()); - InstNameConflictVarargsOp *newOp = cast(::llvm::CallInst::Create(getCalledFunction(), newArgs, ::std::nullopt, this->getName(), this->getIterator())); + InstNameConflictVarargsOp *newOp = ::llvm::cast(::llvm::CallInst::Create(getCalledFunction(), newArgs, ::std::nullopt, this->getName(), this->getIterator())); this->replaceAllUsesWith(newOp); this->eraseFromParent(); return newOp; @@ -2249,7 +2249,7 @@ data if (1 > 0) newArgs.append(arg_begin(), arg_begin() + 1); newArgs.append(args.begin(), args.end()); - WriteVarArgOp *newOp = cast(::llvm::CallInst::Create(getCalledFunction(), newArgs, ::std::nullopt, this->getName(), this->getIterator())); + WriteVarArgOp *newOp = ::llvm::cast(::llvm::CallInst::Create(getCalledFunction(), newArgs, ::std::nullopt, this->getName(), this->getIterator())); this->replaceAllUsesWith(newOp); this->eraseFromParent(); return newOp;