diff options
author | George Rimar <grimar@accesssoftek.com> | 2016-06-23 07:23:07 +0000 |
---|---|---|
committer | George Rimar <grimar@accesssoftek.com> | 2016-06-23 07:23:07 +0000 |
commit | 117fe6ef8473e5d369e821da57329aadad3c7358 (patch) | |
tree | 9e18f2c08a62782ad895a1d881bfabbaeb5cc124 | |
parent | 63d11871789bfba002997cb638b2d7ce50d69729 (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.cpp | 6 |
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(";"); } } |