Skip to content

Commit 17f2054

Browse files
committed
Fix code review comments
1 parent 801e871 commit 17f2054

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

clang/lib/CIR/CodeGen/CIRGenBuiltin.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@ RValue CIRGenFunction::emitBuiltinExpr(const GlobalDecl &gd, unsigned builtinID,
7878
assert(!cir::MissingFeatures::builtinCallMathErrno());
7979
assert(!cir::MissingFeatures::builtinCall());
8080

81+
mlir::Location loc = getLoc(e->getExprLoc());
82+
8183
switch (builtinIDIfNoAsmLabel) {
8284
default:
8385
break;
@@ -88,7 +90,7 @@ RValue CIRGenFunction::emitBuiltinExpr(const GlobalDecl &gd, unsigned builtinID,
8890
return RValue::get(nullptr);
8991

9092
mlir::Value argValue = emitCheckedArgForAssume(e->getArg(0));
91-
builder.create<cir::AssumeOp>(getLoc(e->getExprLoc()), argValue);
93+
builder.create<cir::AssumeOp>(loc, argValue);
9294
return RValue::get(nullptr);
9395
}
9496

@@ -98,8 +100,6 @@ RValue CIRGenFunction::emitBuiltinExpr(const GlobalDecl &gd, unsigned builtinID,
98100
mlir::Value complex = builder.createComplexCreate(loc, real, imag);
99101
return RValue::get(complex);
100102
}
101-
default:
102-
break;
103103
}
104104

105105
cgm.errorNYI(e->getSourceRange(), "unimplemented builtin call");

0 commit comments

Comments
 (0)