diff --git a/clang/lib/CIR/CodeGen/CIRGenBuilder.cpp b/clang/lib/CIR/CodeGen/CIRGenBuilder.cpp index f20ee528f36d..13ec20d8eda2 100644 --- a/clang/lib/CIR/CodeGen/CIRGenBuilder.cpp +++ b/clang/lib/CIR/CodeGen/CIRGenBuilder.cpp @@ -67,14 +67,4 @@ mlir::cir::ConstantOp CIRGenBuilderTy::getConstInt(mlir::Location loc, return create(loc, intTy, mlir::cir::IntAttr::get(t, C)); } - -mlir::cir::ConstantOp CIRGenBuilderTy::getConstFP(mlir::Location loc, - mlir::Type t, - llvm::APFloat fpVal) { - assert((mlir::isa(t)) && - "expected mlir::cir::SingleType or mlir::cir::DoubleType"); - return create(loc, t, - getAttr(t, fpVal)); -} - } // namespace cir diff --git a/clang/lib/CIR/CodeGen/CIRGenBuilder.h b/clang/lib/CIR/CodeGen/CIRGenBuilder.h index 836a42b21ebd..1734f450d303 100644 --- a/clang/lib/CIR/CodeGen/CIRGenBuilder.h +++ b/clang/lib/CIR/CodeGen/CIRGenBuilder.h @@ -538,7 +538,12 @@ class CIRGenBuilderTy : public CIRBaseBuilderTy { uint64_t C); mlir::cir::ConstantOp getConstFP(mlir::Location loc, mlir::Type t, - llvm::APFloat fpVal); + llvm::APFloat fpVal) { + assert((mlir::isa(t)) && + "expected mlir::cir::SingleType or mlir::cir::DoubleType"); + return create(loc, t, + getAttr(t, fpVal)); + } /// Create constant nullptr for pointer-to-data-member type ty. mlir::cir::ConstantOp getNullDataMemberPtr(mlir::cir::DataMemberType ty,