Skip to content

Commit 6cdebf4

Browse files
mmhaandykaylor
andauthored
Apply suggestions from code review
Co-authored-by: Andy Kaylor <[email protected]>
1 parent 1de9842 commit 6cdebf4

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

clang/include/clang/CIR/Dialect/IR/CIROps.td

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2227,7 +2227,7 @@ def CIR_ReturnAddrOp : CIR_FuncAddrBuiltinOp<"return_address"> {
22272227
"The return address of the current function, or of one of its callers";
22282228

22292229
let description = [{
2230-
Represents call to builtin function ` __builtin_return_address` in CIR.
2230+
Represents a call to builtin function ` __builtin_return_address` in CIR.
22312231
This builtin function returns the return address of the current function,
22322232
or of one of its callers.
22332233
The `level` argument is number of frames to scan up the call stack.
@@ -2248,7 +2248,7 @@ def CIR_FrameAddrOp : CIR_FuncAddrBuiltinOp<"frame_address"> {
22482248
"The frame address of the current function, or of one of its callers";
22492249

22502250
let description = [{
2251-
Represents call to builtin function ` __builtin_frame_address` in CIR.
2251+
Represents a call to builtin function ` __builtin_frame_address` in CIR.
22522252
This builtin function returns the frame address of the current function,
22532253
or of one of its callers. The frame is the area on the stack that holds
22542254
local variables and saved registers. The frame address is normally the

clang/lib/CIR/CodeGen/CIRGenBuiltin.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -319,11 +319,11 @@ RValue CIRGenFunction::emitBuiltinExpr(const GlobalDecl &gd, unsigned builtinID,
319319
e->getArg(0), e->getArg(0)->getType());
320320
uint64_t level = mlir::cast<cir::IntAttr>(levelAttr).getUInt();
321321
if (builtinID == Builtin::BI__builtin_return_address) {
322-
return RValue::get(builder.create<cir::ReturnAddrOp>(
322+
return RValue::get(cir::ReturnAddrOp::create(builder,
323323
loc, builder.getUInt32(level, loc)));
324324
}
325325
return RValue::get(
326-
builder.create<cir::FrameAddrOp>(loc, builder.getUInt32(level, loc)));
326+
cir::FrameAddrOp::create(builder, loc, builder.getUInt32(level, loc)));
327327
}
328328

329329
case Builtin::BI__builtin_trap:

clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ createCallLLVMIntrinsicOp(mlir::ConversionPatternRewriter &rewriter,
273273
mlir::Type resultTy, mlir::ValueRange operands) {
274274
auto intrinsicNameAttr =
275275
mlir::StringAttr::get(rewriter.getContext(), intrinsicName);
276-
return rewriter.create<mlir::LLVM::CallIntrinsicOp>(
276+
return mlir::LLVM::CallIntrinsicOp::create(rewriter,
277277
loc, resultTy, intrinsicNameAttr, operands);
278278
}
279279

0 commit comments

Comments
 (0)