Revert "[ELF] Simplify. NFC"

This reverts commit cc6f052261096dc9d4c9d3123e37b023c3e171df.

llvm-svn: 333099
This commit is contained in:
Fangrui Song 2018-05-23 16:51:23 +00:00
parent 578653a8fc
commit bdbe5d8477
1 changed files with 2 additions and 2 deletions

View File

@ -133,8 +133,8 @@ BitcodeCompiler::BitcodeCompiler() {
for (Symbol *Sym : Symtab->getSymbols()) {
StringRef Name = Sym->getName();
for (StringRef Prefix : {"__start_", "__stop_"})
if (Name.consume_front(Prefix))
UsedStartStop.insert(Name);
if (Name.startswith(Prefix))
UsedStartStop.insert(Name.substr(Prefix.size()));
}
}