[lld] r333099 - Revert "[ELF] Simplify. NFC"
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Wed May 23 09:51:23 PDT 2018
Author: maskray
Date: Wed May 23 09:51:23 2018
New Revision: 333099
URL: http://llvm.org/viewvc/llvm-project?rev=333099&view=rev
Log:
Revert "[ELF] Simplify. NFC"
This reverts commit cc6f052261096dc9d4c9d3123e37b023c3e171df.
Modified:
lld/trunk/ELF/LTO.cpp
Modified: lld/trunk/ELF/LTO.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/LTO.cpp?rev=333099&r1=333098&r2=333099&view=diff
==============================================================================
--- lld/trunk/ELF/LTO.cpp (original)
+++ lld/trunk/ELF/LTO.cpp Wed May 23 09:51:23 2018
@@ -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()));
}
}
More information about the llvm-commits
mailing list