diff options
Diffstat (limited to 'llvm/lib/IR/Value.cpp')
-rw-r--r-- | llvm/lib/IR/Value.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/IR/Value.cpp b/llvm/lib/IR/Value.cpp index 41260a98..b485a62 100644 --- a/llvm/lib/IR/Value.cpp +++ b/llvm/lib/IR/Value.cpp @@ -330,8 +330,7 @@ void Value::setNameImpl(const Twine &NewName) { SmallString<256> NameData; StringRef NameRef = NeedNewName ? NewName.toStringRef(NameData) : ""; - assert(NameRef.find_first_of(0) == StringRef::npos && - "Null bytes are not allowed in names"); + assert(!NameRef.contains(0) && "Null bytes are not allowed in names"); // Name isn't changing? if (getName() == NameRef) |