@@ -15,16 +15,16 @@ using namespace mlir;
1515
1616TEST_F (RuntimeCallTest, genAdjustLTest) {
1717 auto loc = firBuilder->getUnknownLoc ();
18- mlir::Value result = firBuilder-> create < fir::UndefOp>( loc, boxTy);
19- mlir::Value string = firBuilder-> create < fir::UndefOp>( loc, boxTy);
18+ mlir::Value result = fir::UndefOp::create (*firBuilder, loc, boxTy);
19+ mlir::Value string = fir::UndefOp::create (*firBuilder, loc, boxTy);
2020 fir::runtime::genAdjustL (*firBuilder, loc, result, string);
2121 checkCallOpFromResultBox (result, " _FortranAAdjustl" , 2 );
2222}
2323
2424TEST_F (RuntimeCallTest, genAdjustRTest) {
2525 auto loc = firBuilder->getUnknownLoc ();
26- mlir::Value result = firBuilder-> create < fir::UndefOp>( loc, boxTy);
27- mlir::Value string = firBuilder-> create < fir::UndefOp>( loc, boxTy);
26+ mlir::Value result = fir::UndefOp::create (*firBuilder, loc, boxTy);
27+ mlir::Value string = fir::UndefOp::create (*firBuilder, loc, boxTy);
2828 fir::runtime::genAdjustR (*firBuilder, loc, result, string);
2929 checkCallOpFromResultBox (result, " _FortranAAdjustr" , 2 );
3030}
@@ -115,40 +115,40 @@ TEST_F(RuntimeCallTest, genIndexTest) {
115115
116116TEST_F (RuntimeCallTest, genIndexDescriptorTest) {
117117 auto loc = firBuilder->getUnknownLoc ();
118- mlir::Value resultBox = firBuilder-> create < fir::UndefOp>( loc, boxTy);
119- mlir::Value stringBox = firBuilder-> create < fir::UndefOp>( loc, boxTy);
120- mlir::Value substringBox = firBuilder-> create < fir::UndefOp>( loc, boxTy);
121- mlir::Value backOpt = firBuilder-> create < fir::UndefOp>( loc, boxTy);
122- mlir::Value kind = firBuilder-> create < fir::UndefOp>( loc, i32Ty);
118+ mlir::Value resultBox = fir::UndefOp::create (*firBuilder, loc, boxTy);
119+ mlir::Value stringBox = fir::UndefOp::create (*firBuilder, loc, boxTy);
120+ mlir::Value substringBox = fir::UndefOp::create (*firBuilder, loc, boxTy);
121+ mlir::Value backOpt = fir::UndefOp::create (*firBuilder, loc, boxTy);
122+ mlir::Value kind = fir::UndefOp::create (*firBuilder, loc, i32Ty);
123123 fir::runtime::genIndexDescriptor (
124124 *firBuilder, loc, resultBox, stringBox, substringBox, backOpt, kind);
125125 checkCallOpFromResultBox (resultBox, " _FortranAIndex" , 5 );
126126}
127127
128128TEST_F (RuntimeCallTest, genRepeatTest) {
129129 auto loc = firBuilder->getUnknownLoc ();
130- mlir::Value resultBox = firBuilder-> create < fir::UndefOp>( loc, boxTy);
131- mlir::Value stringBox = firBuilder-> create < fir::UndefOp>( loc, boxTy);
132- mlir::Value ncopies = firBuilder-> create < fir::UndefOp>( loc, i32Ty);
130+ mlir::Value resultBox = fir::UndefOp::create (*firBuilder, loc, boxTy);
131+ mlir::Value stringBox = fir::UndefOp::create (*firBuilder, loc, boxTy);
132+ mlir::Value ncopies = fir::UndefOp::create (*firBuilder, loc, i32Ty);
133133 fir::runtime::genRepeat (*firBuilder, loc, resultBox, stringBox, ncopies);
134134 checkCallOpFromResultBox (resultBox, " _FortranARepeat" , 3 );
135135}
136136
137137TEST_F (RuntimeCallTest, genTrimTest) {
138138 auto loc = firBuilder->getUnknownLoc ();
139- mlir::Value resultBox = firBuilder-> create < fir::UndefOp>( loc, boxTy);
140- mlir::Value stringBox = firBuilder-> create < fir::UndefOp>( loc, boxTy);
139+ mlir::Value resultBox = fir::UndefOp::create (*firBuilder, loc, boxTy);
140+ mlir::Value stringBox = fir::UndefOp::create (*firBuilder, loc, boxTy);
141141 fir::runtime::genTrim (*firBuilder, loc, resultBox, stringBox);
142142 checkCallOpFromResultBox (resultBox, " _FortranATrim" , 2 );
143143}
144144
145145TEST_F (RuntimeCallTest, genScanDescriptorTest) {
146146 auto loc = firBuilder->getUnknownLoc ();
147- mlir::Value resultBox = firBuilder-> create < fir::UndefOp>( loc, boxTy);
148- mlir::Value stringBox = firBuilder-> create < fir::UndefOp>( loc, boxTy);
149- mlir::Value setBox = firBuilder-> create < fir::UndefOp>( loc, boxTy);
150- mlir::Value backBox = firBuilder-> create < fir::UndefOp>( loc, boxTy);
151- mlir::Value kind = firBuilder-> create < fir::UndefOp>( loc, i32Ty);
147+ mlir::Value resultBox = fir::UndefOp::create (*firBuilder, loc, boxTy);
148+ mlir::Value stringBox = fir::UndefOp::create (*firBuilder, loc, boxTy);
149+ mlir::Value setBox = fir::UndefOp::create (*firBuilder, loc, boxTy);
150+ mlir::Value backBox = fir::UndefOp::create (*firBuilder, loc, boxTy);
151+ mlir::Value kind = fir::UndefOp::create (*firBuilder, loc, i32Ty);
152152 fir::runtime::genScanDescriptor (
153153 *firBuilder, loc, resultBox, stringBox, setBox, backBox, kind);
154154 checkCallOpFromResultBox (resultBox, " _FortranAScan" , 5 );
@@ -178,11 +178,11 @@ TEST_F(RuntimeCallTest, genScanTest) {
178178
179179TEST_F (RuntimeCallTest, genVerifyDescriptorTest) {
180180 auto loc = firBuilder->getUnknownLoc ();
181- mlir::Value resultBox = firBuilder-> create < fir::UndefOp>( loc, boxTy);
182- mlir::Value stringBox = firBuilder-> create < fir::UndefOp>( loc, boxTy);
183- mlir::Value setBox = firBuilder-> create < fir::UndefOp>( loc, boxTy);
184- mlir::Value backBox = firBuilder-> create < fir::UndefOp>( loc, boxTy);
185- mlir::Value kind = firBuilder-> create < fir::UndefOp>( loc, i32Ty);
181+ mlir::Value resultBox = fir::UndefOp::create (*firBuilder, loc, boxTy);
182+ mlir::Value stringBox = fir::UndefOp::create (*firBuilder, loc, boxTy);
183+ mlir::Value setBox = fir::UndefOp::create (*firBuilder, loc, boxTy);
184+ mlir::Value backBox = fir::UndefOp::create (*firBuilder, loc, boxTy);
185+ mlir::Value kind = fir::UndefOp::create (*firBuilder, loc, i32Ty);
186186 fir::runtime::genVerifyDescriptor (
187187 *firBuilder, loc, resultBox, stringBox, setBox, backBox, kind);
188188 checkCallOpFromResultBox (resultBox, " _FortranAVerify" , 5 );
0 commit comments