aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Rimar <grimar@accesssoftek.com>2016-06-23 07:23:07 +0000
committerGeorge Rimar <grimar@accesssoftek.com>2016-06-23 07:23:07 +0000
commit117fe6ef8473e5d369e821da57329aadad3c7358 (patch)
tree9e18f2c08a62782ad895a1d881bfabbaeb5cc124
parent63d11871789bfba002997cb638b2d7ce50d69729 (diff)
Revert r273427 "[ELF] - Simplify loop in parseVersionSymbols(). NFC."
git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@273538 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--ELF/SymbolListFile.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/ELF/SymbolListFile.cpp b/ELF/SymbolListFile.cpp
index 71b8c2186..a5fb693b8 100644
--- a/ELF/SymbolListFile.cpp
+++ b/ELF/SymbolListFile.cpp
@@ -118,9 +118,11 @@ void VersionScriptParser::parseVersionSymbols(StringRef Version) {
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(";");
}
}