mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-11-29 16:41:27 +00:00
[mlir] Silence some deprecation warnings after dffc487b07
This commit is contained in:
parent
72b18a86e1
commit
4941fef9c4
@ -566,9 +566,9 @@ void FunctionLike<ConcreteType>::setArgAttrs(
|
||||
SmallString<8> nameOut;
|
||||
getArgAttrName(index, nameOut);
|
||||
|
||||
if (attributes.empty())
|
||||
return (void)static_cast<ConcreteType *>(this)->removeAttr(nameOut);
|
||||
Operation *op = this->getOperation();
|
||||
if (attributes.empty())
|
||||
return (void)op->removeAttr(nameOut);
|
||||
op->setAttr(nameOut, DictionaryAttr::get(op->getContext(), attributes));
|
||||
}
|
||||
|
||||
|
@ -270,8 +270,8 @@ LogicalResult GPUFuncOpConversion::matchAndRewrite(
|
||||
funcOp, *getTypeConverter(), rewriter, entryPointAttr, argABI);
|
||||
if (!newFuncOp)
|
||||
return failure();
|
||||
newFuncOp.removeAttr(Identifier::get(gpu::GPUDialect::getKernelFuncAttrName(),
|
||||
rewriter.getContext()));
|
||||
newFuncOp->removeAttr(Identifier::get(
|
||||
gpu::GPUDialect::getKernelFuncAttrName(), rewriter.getContext()));
|
||||
return success();
|
||||
}
|
||||
|
||||
|
@ -1514,7 +1514,7 @@ const char *enumAttrBeginPrinterCode = R"(
|
||||
static void genAttrDictPrinter(OperationFormat &fmt, Operator &op,
|
||||
OpMethodBody &body, bool withKeyword) {
|
||||
body << " p.printOptionalAttrDict" << (withKeyword ? "WithKeyword" : "")
|
||||
<< "(getAttrs(), /*elidedAttrs=*/{";
|
||||
<< "((*this)->getAttrs(), /*elidedAttrs=*/{";
|
||||
// Elide the variadic segment size attributes if necessary.
|
||||
if (!fmt.allOperands &&
|
||||
op.getTrait("::mlir::OpTrait::AttrSizedOperandSegments"))
|
||||
|
Loading…
Reference in New Issue
Block a user