@@ -15,16 +15,16 @@ using namespace mlir;
15
15
16
16
TEST_F (RuntimeCallTest, genAdjustLTest) {
17
17
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);
20
20
fir::runtime::genAdjustL (*firBuilder, loc, result, string);
21
21
checkCallOpFromResultBox (result, " _FortranAAdjustl" , 2 );
22
22
}
23
23
24
24
TEST_F (RuntimeCallTest, genAdjustRTest) {
25
25
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);
28
28
fir::runtime::genAdjustR (*firBuilder, loc, result, string);
29
29
checkCallOpFromResultBox (result, " _FortranAAdjustr" , 2 );
30
30
}
@@ -115,40 +115,40 @@ TEST_F(RuntimeCallTest, genIndexTest) {
115
115
116
116
TEST_F (RuntimeCallTest, genIndexDescriptorTest) {
117
117
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);
123
123
fir::runtime::genIndexDescriptor (
124
124
*firBuilder, loc, resultBox, stringBox, substringBox, backOpt, kind);
125
125
checkCallOpFromResultBox (resultBox, " _FortranAIndex" , 5 );
126
126
}
127
127
128
128
TEST_F (RuntimeCallTest, genRepeatTest) {
129
129
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);
133
133
fir::runtime::genRepeat (*firBuilder, loc, resultBox, stringBox, ncopies);
134
134
checkCallOpFromResultBox (resultBox, " _FortranARepeat" , 3 );
135
135
}
136
136
137
137
TEST_F (RuntimeCallTest, genTrimTest) {
138
138
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);
141
141
fir::runtime::genTrim (*firBuilder, loc, resultBox, stringBox);
142
142
checkCallOpFromResultBox (resultBox, " _FortranATrim" , 2 );
143
143
}
144
144
145
145
TEST_F (RuntimeCallTest, genScanDescriptorTest) {
146
146
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);
152
152
fir::runtime::genScanDescriptor (
153
153
*firBuilder, loc, resultBox, stringBox, setBox, backBox, kind);
154
154
checkCallOpFromResultBox (resultBox, " _FortranAScan" , 5 );
@@ -178,11 +178,11 @@ TEST_F(RuntimeCallTest, genScanTest) {
178
178
179
179
TEST_F (RuntimeCallTest, genVerifyDescriptorTest) {
180
180
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);
186
186
fir::runtime::genVerifyDescriptor (
187
187
*firBuilder, loc, resultBox, stringBox, setBox, backBox, kind);
188
188
checkCallOpFromResultBox (resultBox, " _FortranAVerify" , 5 );
0 commit comments