Skip to content

Commit 0227a8d

Browse files
Remove duplicate definition
1 parent 569c69b commit 0227a8d

File tree

2 files changed

+0
-25
lines changed

2 files changed

+0
-25
lines changed

clang/lib/CIR/CodeGen/CIRGenExprScalar.cpp

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1442,28 +1442,6 @@ mlir::Value CIRGenFunction::emitPromotedScalarExpr(const Expr *e,
14421442
return ScalarExprEmitter(*this, builder).Visit(const_cast<Expr *>(e));
14431443
}
14441444

1445-
mlir::Value CIRGenFunction::emitScalarOrConstFoldImmArg(unsigned iceArguments,
1446-
unsigned index,
1447-
const Expr *arg) {
1448-
mlir::Value result{};
1449-
1450-
// The bit at the specified index indicates whether the argument is required
1451-
// to be a constant integer expression.
1452-
bool isArgRequiredToBeConstant = (iceArguments & (1 << index));
1453-
1454-
if (!isArgRequiredToBeConstant) {
1455-
result = emitScalarExpr(arg);
1456-
} else {
1457-
// If this is required to be a constant, constant fold it so that we
1458-
// know that the generated intrinsic gets a ConstantInt.
1459-
std::optional<llvm::APSInt> iceOpt =
1460-
arg->getIntegerConstantExpr(getContext());
1461-
assert(iceOpt && "Expected argument to be a constant");
1462-
result = builder.getConstInt(getLoc(arg->getSourceRange()), *iceOpt);
1463-
}
1464-
return result;
1465-
}
1466-
14671445
[[maybe_unused]] static bool mustVisitNullValue(const Expr *e) {
14681446
// If a null pointer expression's type is the C++0x nullptr_t and
14691447
// the expression is not a simple literal, it must be evaluated

clang/lib/CIR/CodeGen/CIRGenFunction.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1546,9 +1546,6 @@ class CIRGenFunction : public CIRGenTypeCache {
15461546
mlir::Value emitScalarExpr(const clang::Expr *e,
15471547
bool ignoreResultAssign = false);
15481548

1549-
mlir::Value emitScalarOrConstFoldImmArg(unsigned iceArguments, unsigned index,
1550-
const Expr *arg);
1551-
15521549
mlir::Value emitScalarPrePostIncDec(const UnaryOperator *e, LValue lv,
15531550
cir::UnaryOpKind kind, bool isPre);
15541551

0 commit comments

Comments
 (0)