Skip to content

Commit 8f60ac8

Browse files
committed
Use fir::genConstantIndex in CodeGen
1 parent f8ea636 commit 8f60ac8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

flang/lib/Optimizer/CodeGen/CodeGen.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1074,8 +1074,8 @@ struct AllocMemOpConversion : public fir::FIROpConversion<fir::AllocMemOp> {
10741074
// As the return value of malloc(0) is implementation defined, allocate one
10751075
// byte to ensure the allocation status being true. This behavior aligns to
10761076
// what the runtime has.
1077-
mlir::Value zero = genConstantIndex(loc, ity, rewriter, 0);
1078-
mlir::Value one = genConstantIndex(loc, ity, rewriter, 1);
1077+
mlir::Value zero = fir::genConstantIndex(loc, ity, rewriter, 0);
1078+
mlir::Value one = fir::genConstantIndex(loc, ity, rewriter, 1);
10791079
mlir::Value cmp = rewriter.create<mlir::LLVM::ICmpOp>(
10801080
loc, mlir::LLVM::ICmpPredicate::sgt, size, zero);
10811081
size = rewriter.create<mlir::LLVM::SelectOp>(loc, cmp, size, one);

0 commit comments

Comments
 (0)