aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CIR/Dialect/IR
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/CIR/Dialect/IR')
-rw-r--r--clang/lib/CIR/Dialect/IR/CIRDialect.cpp8
-rw-r--r--clang/lib/CIR/Dialect/IR/CIRMemorySlot.cpp4
2 files changed, 6 insertions, 6 deletions
diff --git a/clang/lib/CIR/Dialect/IR/CIRDialect.cpp b/clang/lib/CIR/Dialect/IR/CIRDialect.cpp
index fa180f5..2d2ef42 100644
--- a/clang/lib/CIR/Dialect/IR/CIRDialect.cpp
+++ b/clang/lib/CIR/Dialect/IR/CIRDialect.cpp
@@ -95,8 +95,8 @@ Operation *cir::CIRDialect::materializeConstant(mlir::OpBuilder &builder,
mlir::Attribute value,
mlir::Type type,
mlir::Location loc) {
- return builder.create<cir::ConstantOp>(loc, type,
- mlir::cast<mlir::TypedAttr>(value));
+ return cir::ConstantOp::create(builder, loc, type,
+ mlir::cast<mlir::TypedAttr>(value));
}
//===----------------------------------------------------------------------===//
@@ -184,7 +184,7 @@ static LogicalResult ensureRegionTerm(OpAsmParser &parser, Region &region,
// Terminator was omitted correctly: recreate it.
builder.setInsertionPointToEnd(&block);
- builder.create<cir::YieldOp>(eLoc);
+ cir::YieldOp::create(builder, eLoc);
return success();
}
@@ -977,7 +977,7 @@ void cir::IfOp::print(OpAsmPrinter &p) {
/// Default callback for IfOp builders.
void cir::buildTerminatedBody(OpBuilder &builder, Location loc) {
// add cir.yield to end of the block
- builder.create<cir::YieldOp>(loc);
+ cir::YieldOp::create(builder, loc);
}
/// Given the region at `index`, or the parent operation if `index` is None,
diff --git a/clang/lib/CIR/Dialect/IR/CIRMemorySlot.cpp b/clang/lib/CIR/Dialect/IR/CIRMemorySlot.cpp
index 7e96ae9..66469e2 100644
--- a/clang/lib/CIR/Dialect/IR/CIRMemorySlot.cpp
+++ b/clang/lib/CIR/Dialect/IR/CIRMemorySlot.cpp
@@ -34,8 +34,8 @@ llvm::SmallVector<MemorySlot> cir::AllocaOp::getPromotableSlots() {
Value cir::AllocaOp::getDefaultValue(const MemorySlot &slot,
OpBuilder &builder) {
- return builder.create<cir::ConstantOp>(getLoc(),
- cir::UndefAttr::get(slot.elemType));
+ return cir::ConstantOp::create(builder, getLoc(),
+ cir::UndefAttr::get(slot.elemType));
}
void cir::AllocaOp::handleBlockArgument(const MemorySlot &slot,