summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lld/ELF/LTO.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lld/ELF/LTO.cpp b/lld/ELF/LTO.cpp
index c47a5a8a292..ee55e7ce563 100644
--- a/lld/ELF/LTO.cpp
+++ b/lld/ELF/LTO.cpp
@@ -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()));
}
}
OpenPOWER on IntegriCloud