Simplify. NFC.
authorRui Ueyama <ruiu@google.com>
Sun, 20 Nov 2016 23:15:56 +0000 (23:15 +0000)
committerRui Ueyama <ruiu@google.com>
Sun, 20 Nov 2016 23:15:56 +0000 (23:15 +0000)
llvm-svn: 287510

lld/ELF/DriverUtils.cpp

index 2f13937..546256b 100644 (file)
@@ -104,11 +104,9 @@ void elf::parseDynamicList(MemoryBufferRef MB) {
     void run() {
       while (!atEOF()) {
         expect("{");
-        while (!Error) {
+        while (!Error && !consume("}")) {
           Config->DynamicList.push_back(unquote(next()));
           expect(";");
-          if (consume("}"))
-            break;
         }
         expect(";");
       }