Skip to content

Commit 0159eb6

Browse files
[mlir] Use StringRef::consume_front (NFC) (llvm#139459)
1 parent 7470131 commit 0159eb6

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

mlir/lib/Target/LLVMIR/ModuleTranslation.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -296,8 +296,7 @@ translateDataLayout(DataLayoutSpecInterface attribute,
296296
return failure();
297297
}
298298
StringRef layoutSpec(llvmDataLayout);
299-
if (layoutSpec.starts_with("-"))
300-
layoutSpec = layoutSpec.drop_front();
299+
layoutSpec.consume_front("-");
301300

302301
return llvm::DataLayout(layoutSpec);
303302
}

0 commit comments

Comments
 (0)