Skip to content

Commit 2aba8c9

Browse files
committed
Use fir::genConstantIndex in CodeGen
1 parent 1c93a46 commit 2aba8c9

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
@@ -1079,8 +1079,8 @@ struct AllocMemOpConversion : public fir::FIROpConversion<fir::AllocMemOp> {
10791079
// As the return value of malloc(0) is implementation defined, allocate one
10801080
// byte to ensure the allocation status being true. This behavior aligns to
10811081
// what the runtime has.
1082-
mlir::Value zero = genConstantIndex(loc, ity, rewriter, 0);
1083-
mlir::Value one = genConstantIndex(loc, ity, rewriter, 1);
1082+
mlir::Value zero = fir::genConstantIndex(loc, ity, rewriter, 0);
1083+
mlir::Value one = fir::genConstantIndex(loc, ity, rewriter, 1);
10841084
mlir::Value cmp = mlir::LLVM::ICmpOp::create(
10851085
rewriter, loc, mlir::LLVM::ICmpPredicate::sgt, size, zero);
10861086
size = mlir::LLVM::SelectOp::create(rewriter, loc, cmp, size, one);

0 commit comments

Comments
 (0)