[lld] r273538 - Revert r273427 "[ELF] - Simplify loop in parseVersionSymbols(). NFC."
George Rimar via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 23 00:23:07 PDT 2016
Author: grimar
Date: Thu Jun 23 02:23:07 2016
New Revision: 273538
URL: http://llvm.org/viewvc/llvm-project?rev=273538&view=rev
Log:
Revert r273427 "[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=273538&r1=273537&r2=273538&view=diff
==============================================================================
--- lld/trunk/ELF/SymbolListFile.cpp (original)
+++ lld/trunk/ELF/SymbolListFile.cpp Thu Jun 23 02:23:07 2016
@@ -118,9 +118,11 @@ void VersionScriptParser::parseVersionSy
for (;;) {
if (peek() == "extern")
setError("extern keyword is not supported");
- if (peek() == "}" || peek() == "local:" || Error)
+ StringRef Cur = peek();
+ if (Cur == "}" || Cur == "local:" || Error)
return;
- Globals->push_back(next());
+ next();
+ Globals->push_back(Cur);
expect(";");
}
}
More information about the llvm-commits
mailing list