Skip to content

Commit 59fe840

Browse files
authored
[LV] Use StringRef::consume_front. NFC (llvm#161454)
1 parent 23e0815 commit 59fe840

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

llvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -293,9 +293,8 @@ void LoopVectorizeHints::getHintsFromMetadata() {
293293
}
294294

295295
void LoopVectorizeHints::setHint(StringRef Name, Metadata *Arg) {
296-
if (!Name.starts_with(Prefix()))
296+
if (!Name.consume_front(Prefix()))
297297
return;
298-
Name = Name.substr(Prefix().size(), StringRef::npos);
299298

300299
const ConstantInt *C = mdconst::dyn_extract<ConstantInt>(Arg);
301300
if (!C)

0 commit comments

Comments
 (0)