[ObjCopy] Use StringRef::starts_with (NFC) (#139408)
This commit is contained in:
parent
8e2a9fa9a5
commit
d4e730f49b
@ -352,8 +352,7 @@ static Error updateAndRemoveSymbols(const CommonConfig &Config,
|
||||
Sym.Name = std::string(I->getValue());
|
||||
|
||||
if (!Config.SymbolsPrefixRemove.empty() && Sym.Type != STT_SECTION)
|
||||
if (Sym.Name.compare(0, Config.SymbolsPrefixRemove.size(),
|
||||
Config.SymbolsPrefixRemove) == 0)
|
||||
if (StringRef(Sym.Name).starts_with(Config.SymbolsPrefixRemove))
|
||||
Sym.Name = Sym.Name.substr(Config.SymbolsPrefixRemove.size());
|
||||
|
||||
if (!Config.SymbolsPrefix.empty() && Sym.Type != STT_SECTION)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user