Skip to content

Commit d5c7109

Browse files
author
git apple-llvm automerger
committed
Merge commit '01c5b5c1040a' from llvm.org/main into next
2 parents 60151d5 + 01c5b5c commit d5c7109

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

llvm/lib/ObjCopy/CommonConfig.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,7 @@ NameOrPattern::create(StringRef Pattern, MatchStyle MS,
2020
return NameOrPattern(Pattern);
2121
case MatchStyle::Wildcard: {
2222
SmallVector<char, 32> Data;
23-
bool IsPositiveMatch = true;
24-
if (Pattern[0] == '!') {
25-
IsPositiveMatch = false;
26-
Pattern = Pattern.drop_front();
27-
}
23+
bool IsPositiveMatch = !Pattern.consume_front("!");
2824
Expected<GlobPattern> GlobOrErr = GlobPattern::create(Pattern);
2925

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

0 commit comments

Comments
 (0)