diff options
author | Kazu Hirata <kazu@google.com> | 2023-10-18 17:29:04 -0700 |
---|---|---|
committer | Kazu Hirata <kazu@google.com> | 2023-10-18 17:29:04 -0700 |
commit | 5b83bd133d705b024bfb34e4941941689456ba8c (patch) | |
tree | 983104ba1d192a3e5cdef582ca86658ac425d89e /llvm/lib/Bitcode | |
parent | cfbf0a500f173b532f64fcb856af2fb0cb7ba725 (diff) | |
download | llvm-5b83bd133d705b024bfb34e4941941689456ba8c.zip llvm-5b83bd133d705b024bfb34e4941941689456ba8c.tar.gz llvm-5b83bd133d705b024bfb34e4941941689456ba8c.tar.bz2 |
[llvm] Use StringRef::contains (NFC)
Diffstat (limited to 'llvm/lib/Bitcode')
-rw-r--r-- | llvm/lib/Bitcode/Reader/BitcodeReader.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp index 16eafa6..28addb9 100644 --- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp +++ b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp @@ -2646,7 +2646,7 @@ Expected<Value *> BitcodeReader::recordValue(SmallVectorImpl<uint64_t> &Record, Value *V = ValueList[ValueID]; StringRef NameStr(ValueName.data(), ValueName.size()); - if (NameStr.find_first_of(0) != StringRef::npos) + if (NameStr.contains(0)) return error("Invalid value name"); V->setName(NameStr); auto *GO = dyn_cast<GlobalObject>(V); |