Skip to content

Commit a9673ce

Browse files
committed
Update IntrinsicInst.cpp
1 parent a04c94d commit a9673ce

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/IR/IntrinsicInst.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ void DbgAssignIntrinsic::setValue(Value *V) {
235235

236236
int llvm::Intrinsic::lookupLLVMIntrinsicByName(ArrayRef<const char *> NameTable,
237237
StringRef Name) {
238-
assert(Name.startswith("llvm."));
238+
assert(Name.starts_with("llvm.") && "Unexpected intrinsic prefix");
239239

240240
// Do successive binary searches of the dotted name components. For
241241
// "llvm.gc.experimental.statepoint.p1i8.p1i32", we will find the range of
@@ -265,7 +265,7 @@ int llvm::Intrinsic::lookupLLVMIntrinsicByName(ArrayRef<const char *> NameTable,
265265
return -1;
266266
StringRef NameFound = *LastLow;
267267
if (Name == NameFound ||
268-
(Name.startswith(NameFound) && Name[NameFound.size()] == '.'))
268+
(Name.starts_with(NameFound) && Name[NameFound.size()] == '.'))
269269
return LastLow - NameTable.begin();
270270
return -1;
271271
}

0 commit comments

Comments
 (0)