[lld] r273427 - [ELF] - Simplify loop in parseVersionSymbols(). NFC.
George Rimar via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 22 08:06:21 PDT 2016
Author: grimar
Date: Wed Jun 22 10:06:21 2016
New Revision: 273427
URL: http://llvm.org/viewvc/llvm-project?rev=273427&view=rev
Log:
[ELF] - Simplify loop in parseVersionSymbols(). NFC.
Modified:
lld/trunk/ELF/SymbolListFile.cpp
Modified: lld/trunk/ELF/SymbolListFile.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/SymbolListFile.cpp?rev=273427&r1=273426&r2=273427&view=diff
==============================================================================
--- lld/trunk/ELF/SymbolListFile.cpp (original)
+++ lld/trunk/ELF/SymbolListFile.cpp Wed Jun 22 10:06:21 2016
@@ -118,11 +118,9 @@ void VersionScriptParser::parseVersionSy
for (;;) {
if (peek() == "extern")
setError("extern keyword is not supported");
- StringRef Cur = peek();
- if (Cur == "}" || Cur == "local:" || Error)
+ if (peek() == "}" || peek() == "local:" || Error)
return;
- next();
- Globals->push_back(Cur);
+ Globals->push_back(next());
expect(";");
}
}
More information about the llvm-commits
mailing list