Skip to content

Commit c98ee84

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

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1264,7 +1264,7 @@ def TernaryOp : CIR_Op<"ternary",
12641264
Example:
12651265

12661266
```mlir
1267-
// x = cond ? a : b;
1267+
// cond = a && b;
12681268

12691269
%x = cir.ternary (%cond, true_region {
12701270
...

clang/lib/CIR/Dialect/Transforms/FlattenCFG.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ class CIRTernaryOpFlattening : public mlir::OpRewritePattern<cir::TernaryOp> {
270270
// when relevant.
271271
if (op->getResultTypes().size())
272272
locs.push_back(loc);
273-
auto *continueBlock =
273+
Block *continueBlock =
274274
rewriter.createBlock(remainingOpsBlock, op->getResultTypes(), locs);
275275
rewriter.create<cir::BrOp>(loc, remainingOpsBlock);
276276

@@ -290,7 +290,7 @@ class CIRTernaryOpFlattening : public mlir::OpRewritePattern<cir::TernaryOp> {
290290
falseBlock = &falseRegion.front();
291291
mlir::Operation *falseTerminator = falseRegion.back().getTerminator();
292292
rewriter.setInsertionPointToEnd(&falseRegion.back());
293-
cir::YieldOp falseYieldOp = dyn_cast<cir::YieldOp>(falseTerminator);
293+
auto falseYieldOp = dyn_cast<cir::YieldOp>(falseTerminator);
294294
rewriter.replaceOpWithNewOp<cir::BrOp>(falseYieldOp, falseYieldOp.getArgs(),
295295
continueBlock);
296296
rewriter.inlineRegionBefore(falseRegion, continueBlock);

0 commit comments

Comments
 (0)