summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lld/ELF/DriverUtils.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/lld/ELF/DriverUtils.cpp b/lld/ELF/DriverUtils.cpp
index 2f139371f06..546256bc969 100644
--- a/lld/ELF/DriverUtils.cpp
+++ b/lld/ELF/DriverUtils.cpp
@@ -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(";");
}
OpenPOWER on IntegriCloud