Skip to content

Commit

Permalink
[ObjCopy] Use StringRef::consume_front (NFC)
Browse files Browse the repository at this point in the history
  • Loading branch information
kazutakahirata committed Jan 20, 2024
1 parent b1d4265 commit 01c5b5c
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions llvm/lib/ObjCopy/CommonConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,7 @@ NameOrPattern::create(StringRef Pattern, MatchStyle MS,
return NameOrPattern(Pattern);
case MatchStyle::Wildcard: {
SmallVector<char, 32> Data;
bool IsPositiveMatch = true;
if (Pattern[0] == '!') {
IsPositiveMatch = false;
Pattern = Pattern.drop_front();
}
bool IsPositiveMatch = !Pattern.consume_front("!");
Expected<GlobPattern> GlobOrErr = GlobPattern::create(Pattern);

// If we couldn't create it as a glob, report the error, but try again
Expand Down

0 comments on commit 01c5b5c

Please sign in to comment.