Skip to content

Commit 9d3df5f

Browse files
committed
Use setNoInline method.
1 parent 2105c34 commit 9d3df5f

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

mlir/lib/Conversion/FuncToLLVM/FuncToLLVM.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ using namespace mlir;
6262
static constexpr StringRef varargsAttrName = "func.varargs";
6363
static constexpr StringRef linkageAttrName = "llvm.linkage";
6464
static constexpr StringRef barePtrAttrName = "llvm.bareptr";
65-
static constexpr StringRef noInlineAttr = "no_inline";
65+
static constexpr StringRef noInlineAttrName = "no_inline";
6666

6767
/// Return `true` if the `op` should use bare pointer calling convention.
6868
static bool shouldUseBarePtrCallConv(Operation *op,
@@ -383,9 +383,7 @@ mlir::convertFuncOpToLLVMFuncOp(FunctionOpInterface funcOp,
383383
}
384384

385385
// Propagate no_inline attributes
386-
if (funcOp->hasAttr(noInlineAttr)) {
387-
newFuncOp->setAttr(noInlineAttr, rewriter.getUnitAttr());
388-
}
386+
newFuncOp.setNoInline(funcOp->hasAttr(noInlineAttrName));
389387

390388
// Propagate argument/result attributes to all converted arguments/result
391389
// obtained after converting a given original argument/result.

0 commit comments

Comments
 (0)