@@ -37,7 +37,7 @@ FailureOr<uint64_t> LvlTypeParser::parseLvlType(AsmParser &parser) const {
37
37
uint64_t properties = 0 ;
38
38
SmallVector<unsigned > structured;
39
39
40
- if (base. compare ( " structured " ) == 0 ) {
40
+ if (base == " structured " ) {
41
41
ParseResult res = parser.parseCommaSeparatedList (
42
42
mlir::OpAsmParser::Delimiter::OptionalSquare,
43
43
[&]() -> ParseResult { return parseStructured (parser, &structured); },
@@ -60,18 +60,18 @@ FailureOr<uint64_t> LvlTypeParser::parseLvlType(AsmParser &parser) const {
60
60
FAILURE_IF_FAILED (res)
61
61
62
62
// Set the base bit for properties.
63
- if (base. compare ( " dense " ) == 0 ) {
63
+ if (base == " dense " ) {
64
64
properties |= static_cast <uint64_t >(LevelFormat::Dense);
65
- } else if (base. compare ( " batch " ) == 0 ) {
65
+ } else if (base == " batch " ) {
66
66
properties |= static_cast <uint64_t >(LevelFormat::Batch);
67
- } else if (base. compare ( " compressed " ) == 0 ) {
67
+ } else if (base == " compressed " ) {
68
68
properties |= static_cast <uint64_t >(LevelFormat::Compressed);
69
- } else if (base. compare ( " structured " ) == 0 ) {
69
+ } else if (base == " structured " ) {
70
70
properties |= static_cast <uint64_t >(LevelFormat::NOutOfM);
71
71
properties |= nToBits (structured[0 ]) | mToBits (structured[1 ]);
72
- } else if (base. compare ( " loose_compressed " ) == 0 ) {
72
+ } else if (base == " loose_compressed " ) {
73
73
properties |= static_cast <uint64_t >(LevelFormat::LooseCompressed);
74
- } else if (base. compare ( " singleton " ) == 0 ) {
74
+ } else if (base == " singleton " ) {
75
75
properties |= static_cast <uint64_t >(LevelFormat::Singleton);
76
76
} else {
77
77
parser.emitError (loc, " unknown level format: " ) << base;
0 commit comments