aboutsummaryrefslogtreecommitdiff
path: root/mlir/lib/Bytecode/Reader/BytecodeReader.cpp
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2023-12-13 22:58:30 -0800
committerKazu Hirata <kazu@google.com>2023-12-13 22:58:30 -0800
commit88d319a29ff5d3be1bb9a7e88ef6e17df1dfe607 (patch)
tree0d0c2a72eda672390c0b6781bd6018f2622da230 /mlir/lib/Bytecode/Reader/BytecodeReader.cpp
parent5c9d82de6b72cc0c037daecce452c450870f0034 (diff)
downloadllvm-88d319a29ff5d3be1bb9a7e88ef6e17df1dfe607.zip
llvm-88d319a29ff5d3be1bb9a7e88ef6e17df1dfe607.tar.gz
llvm-88d319a29ff5d3be1bb9a7e88ef6e17df1dfe607.tar.bz2
[mlir] Use StringRef::{starts,ends}_with (NFC)
This patch replaces uses of StringRef::{starts,ends}with with StringRef::{starts,ends}_with for consistency with std::{string,string_view}::{starts,ends}_with in C++20. I'm planning to deprecate and eventually remove StringRef::{starts,ends}with.
Diffstat (limited to 'mlir/lib/Bytecode/Reader/BytecodeReader.cpp')
-rw-r--r--mlir/lib/Bytecode/Reader/BytecodeReader.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/mlir/lib/Bytecode/Reader/BytecodeReader.cpp b/mlir/lib/Bytecode/Reader/BytecodeReader.cpp
index 0bc2a2f..7cf3bd83 100644
--- a/mlir/lib/Bytecode/Reader/BytecodeReader.cpp
+++ b/mlir/lib/Bytecode/Reader/BytecodeReader.cpp
@@ -2564,7 +2564,7 @@ BytecodeReader::finalize(function_ref<bool(Operation *)> shouldMaterialize) {
}
bool mlir::isBytecode(llvm::MemoryBufferRef buffer) {
- return buffer.getBuffer().startswith("ML\xefR");
+ return buffer.getBuffer().starts_with("ML\xefR");
}
/// Read the bytecode from the provided memory buffer reference.