@@ -73,7 +73,7 @@ TEST(MachineOperandTest, PrintRegisterMask) {
73
73
std::string str;
74
74
raw_string_ostream OS (str);
75
75
MO.print (OS, /* TRI=*/ nullptr , /* IntrinsicInfo=*/ nullptr );
76
- ASSERT_TRUE (OS. str () == " <regmask ...>" );
76
+ ASSERT_TRUE (str == " <regmask ...>" );
77
77
}
78
78
79
79
TEST (MachineOperandTest, PrintSubReg) {
@@ -94,7 +94,7 @@ TEST(MachineOperandTest, PrintSubReg) {
94
94
std::string str;
95
95
raw_string_ostream OS (str);
96
96
MO.print (OS, /* TRI=*/ nullptr , /* IntrinsicInfo=*/ nullptr );
97
- ASSERT_TRUE (OS. str () == " $physreg1.subreg5" );
97
+ ASSERT_TRUE (str == " $physreg1.subreg5" );
98
98
}
99
99
100
100
TEST (MachineOperandTest, PrintCImm) {
@@ -116,7 +116,7 @@ TEST(MachineOperandTest, PrintCImm) {
116
116
std::string str;
117
117
raw_string_ostream OS (str);
118
118
MO.print (OS, /* TRI=*/ nullptr , /* IntrinsicInfo=*/ nullptr );
119
- ASSERT_TRUE (OS. str () == " i128 18446744073709551616" );
119
+ ASSERT_TRUE (str == " i128 18446744073709551616" );
120
120
}
121
121
122
122
TEST (MachineOperandTest, PrintSubRegIndex) {
@@ -133,7 +133,7 @@ TEST(MachineOperandTest, PrintSubRegIndex) {
133
133
std::string str;
134
134
raw_string_ostream OS (str);
135
135
MachineOperand::printSubRegIdx (OS, MO.getImm (), nullptr );
136
- ASSERT_TRUE (OS. str () == " %subreg.3" );
136
+ ASSERT_TRUE (str == " %subreg.3" );
137
137
}
138
138
139
139
TEST (MachineOperandTest, PrintCPI) {
@@ -152,7 +152,7 @@ TEST(MachineOperandTest, PrintCPI) {
152
152
{
153
153
raw_string_ostream OS (str);
154
154
MO.print (OS, /* TRI=*/ nullptr , /* IntrinsicInfo=*/ nullptr );
155
- ASSERT_TRUE (OS. str () == " %const.0 + 8" );
155
+ ASSERT_TRUE (str == " %const.0 + 8" );
156
156
}
157
157
158
158
str.clear ();
@@ -164,7 +164,7 @@ TEST(MachineOperandTest, PrintCPI) {
164
164
{
165
165
raw_string_ostream OS (str);
166
166
MO.print (OS, /* TRI=*/ nullptr , /* IntrinsicInfo=*/ nullptr );
167
- ASSERT_TRUE (OS. str () == " %const.0 - 12" );
167
+ ASSERT_TRUE (str == " %const.0 - 12" );
168
168
}
169
169
}
170
170
@@ -183,7 +183,7 @@ TEST(MachineOperandTest, PrintTargetIndexName) {
183
183
{
184
184
raw_string_ostream OS (str);
185
185
MO.print (OS, /* TRI=*/ nullptr , /* IntrinsicInfo=*/ nullptr );
186
- ASSERT_TRUE (OS. str () == " target-index(<unknown>) + 8" );
186
+ ASSERT_TRUE (str == " target-index(<unknown>) + 8" );
187
187
}
188
188
189
189
str.clear ();
@@ -194,7 +194,7 @@ TEST(MachineOperandTest, PrintTargetIndexName) {
194
194
{
195
195
raw_string_ostream OS (str);
196
196
MO.print (OS, /* TRI=*/ nullptr , /* IntrinsicInfo=*/ nullptr );
197
- ASSERT_TRUE (OS. str () == " target-index(<unknown>) - 12" );
197
+ ASSERT_TRUE (str == " target-index(<unknown>) - 12" );
198
198
}
199
199
}
200
200
@@ -211,7 +211,7 @@ TEST(MachineOperandTest, PrintJumpTableIndex) {
211
211
std::string str;
212
212
raw_string_ostream OS (str);
213
213
MO.print (OS, /* TRI=*/ nullptr , /* IntrinsicInfo=*/ nullptr );
214
- ASSERT_TRUE (OS. str () == " %jump-table.3" );
214
+ ASSERT_TRUE (str == " %jump-table.3" );
215
215
}
216
216
217
217
TEST (MachineOperandTest, PrintExternalSymbol) {
@@ -228,7 +228,7 @@ TEST(MachineOperandTest, PrintExternalSymbol) {
228
228
{
229
229
raw_string_ostream OS (str);
230
230
MO.print (OS, /* TRI=*/ nullptr , /* IntrinsicInfo=*/ nullptr );
231
- ASSERT_TRUE (OS. str () == " &foo" );
231
+ ASSERT_TRUE (str == " &foo" );
232
232
}
233
233
234
234
str.clear ();
@@ -238,7 +238,7 @@ TEST(MachineOperandTest, PrintExternalSymbol) {
238
238
{
239
239
raw_string_ostream OS (str);
240
240
MO.print (OS, /* TRI=*/ nullptr , /* IntrinsicInfo=*/ nullptr );
241
- ASSERT_TRUE (OS. str () == " &foo + 12" );
241
+ ASSERT_TRUE (str == " &foo + 12" );
242
242
}
243
243
244
244
str.clear ();
@@ -248,7 +248,7 @@ TEST(MachineOperandTest, PrintExternalSymbol) {
248
248
{
249
249
raw_string_ostream OS (str);
250
250
MO.print (OS, /* TRI=*/ nullptr , /* IntrinsicInfo=*/ nullptr );
251
- ASSERT_TRUE (OS. str () == " &foo - 12" );
251
+ ASSERT_TRUE (str == " &foo - 12" );
252
252
}
253
253
}
254
254
@@ -274,7 +274,7 @@ TEST(MachineOperandTest, PrintGlobalAddress) {
274
274
{
275
275
raw_string_ostream OS (str);
276
276
MO.print (OS, /* TRI=*/ nullptr , /* IntrinsicInfo=*/ nullptr );
277
- ASSERT_TRUE (OS. str () == " @foo + 12" );
277
+ ASSERT_TRUE (str == " @foo + 12" );
278
278
}
279
279
280
280
str.clear ();
@@ -284,7 +284,7 @@ TEST(MachineOperandTest, PrintGlobalAddress) {
284
284
{
285
285
raw_string_ostream OS (str);
286
286
MO.print (OS, /* TRI=*/ nullptr , /* IntrinsicInfo=*/ nullptr );
287
- ASSERT_TRUE (OS. str () == " @foo - 12" );
287
+ ASSERT_TRUE (str == " @foo - 12" );
288
288
}
289
289
}
290
290
@@ -302,7 +302,7 @@ TEST(MachineOperandTest, PrintRegisterLiveOut) {
302
302
// Print a MachineOperand containing a register live out list without a TRI.
303
303
raw_string_ostream OS (str);
304
304
MO.print (OS, /* TRI=*/ nullptr , /* IntrinsicInfo=*/ nullptr );
305
- ASSERT_TRUE (OS. str () == " liveout(<unknown>)" );
305
+ ASSERT_TRUE (str == " liveout(<unknown>)" );
306
306
}
307
307
308
308
TEST (MachineOperandTest, PrintMetadata) {
@@ -328,7 +328,7 @@ TEST(MachineOperandTest, PrintMetadata) {
328
328
MO.print (OS, MST, LLT{}, /* OpIdx*/ ~0U , /* PrintDef=*/ false , /* IsStandalone=*/ false ,
329
329
/* ShouldPrintRegisterTies=*/ false , 0 , /* TRI=*/ nullptr ,
330
330
/* IntrinsicInfo=*/ nullptr );
331
- ASSERT_TRUE (OS. str () == " !0" );
331
+ ASSERT_TRUE (str == " !0" );
332
332
}
333
333
334
334
TEST (MachineOperandTest, PrintMCSymbol) {
@@ -349,7 +349,7 @@ TEST(MachineOperandTest, PrintMCSymbol) {
349
349
// Print a MachineOperand containing a metadata node.
350
350
raw_string_ostream OS (str);
351
351
MO.print (OS, /* TRI=*/ nullptr , /* IntrinsicInfo=*/ nullptr );
352
- ASSERT_TRUE (OS. str () == " <mcsymbol foo>" );
352
+ ASSERT_TRUE (str == " <mcsymbol foo>" );
353
353
}
354
354
355
355
TEST (MachineOperandTest, PrintCFI) {
@@ -366,7 +366,7 @@ TEST(MachineOperandTest, PrintCFI) {
366
366
// attached to it.
367
367
raw_string_ostream OS (str);
368
368
MO.print (OS, /* TRI=*/ nullptr , /* IntrinsicInfo=*/ nullptr );
369
- ASSERT_TRUE (OS. str () == " <cfi directive>" );
369
+ ASSERT_TRUE (str == " <cfi directive>" );
370
370
}
371
371
372
372
TEST (MachineOperandTest, PrintIntrinsicID) {
@@ -383,7 +383,7 @@ TEST(MachineOperandTest, PrintIntrinsicID) {
383
383
// Print a MachineOperand containing a generic intrinsic ID.
384
384
raw_string_ostream OS (str);
385
385
MO.print (OS, /* TRI=*/ nullptr , /* IntrinsicInfo=*/ nullptr );
386
- ASSERT_TRUE (OS. str () == " intrinsic(@llvm.bswap)" );
386
+ ASSERT_TRUE (str == " intrinsic(@llvm.bswap)" );
387
387
}
388
388
389
389
str.clear ();
@@ -394,7 +394,7 @@ TEST(MachineOperandTest, PrintIntrinsicID) {
394
394
// IntrinsicInfo.
395
395
raw_string_ostream OS (str);
396
396
MO.print (OS, /* TRI=*/ nullptr , /* IntrinsicInfo=*/ nullptr );
397
- ASSERT_TRUE (OS. str () == " intrinsic(4294967295)" );
397
+ ASSERT_TRUE (str == " intrinsic(4294967295)" );
398
398
}
399
399
}
400
400
@@ -411,7 +411,7 @@ TEST(MachineOperandTest, PrintPredicate) {
411
411
// Print a MachineOperand containing a int predicate ICMP_EQ.
412
412
raw_string_ostream OS (str);
413
413
MO.print (OS, /* TRI=*/ nullptr , /* IntrinsicInfo=*/ nullptr );
414
- ASSERT_TRUE (OS. str () == " intpred(eq)" );
414
+ ASSERT_TRUE (str == " intpred(eq)" );
415
415
}
416
416
417
417
TEST (MachineOperandTest, HashValue) {
0 commit comments