[lld] 5f38040 - [ELF] Simplify parsing of version dependency. NFC

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Sat Feb 8 14:11:04 PST 2020


Author: Fangrui Song
Date: 2020-02-08T14:10:29-08:00
New Revision: 5f380403598a699b27701d912c3ab29bf9a15ca1

URL: https://github.com/llvm/llvm-project/commit/5f380403598a699b27701d912c3ab29bf9a15ca1
DIFF: https://github.com/llvm/llvm-project/commit/5f380403598a699b27701d912c3ab29bf9a15ca1.diff

LOG: [ELF] Simplify parsing of version dependency. NFC

Added: 
    

Modified: 
    lld/ELF/ScriptParser.cpp

Removed: 
    


################################################################################
diff  --git a/lld/ELF/ScriptParser.cpp b/lld/ELF/ScriptParser.cpp
index 27e1ae1bdf2f..635d28139337 100644
--- a/lld/ELF/ScriptParser.cpp
+++ b/lld/ELF/ScriptParser.cpp
@@ -1454,9 +1454,8 @@ void ScriptParser::readVersionDeclaration(StringRef verStr) {
   // as a parent. This version hierarchy is, probably against your
   // instinct, purely for hint; the runtime doesn't care about it
   // at all. In LLD, we simply ignore it.
-  if (peek() != ";")
-    skip();
-  expect(";");
+  if (next() != ";")
+    expect(";");
 }
 
 static bool hasWildcard(StringRef s) {


        


More information about the llvm-commits mailing list