[ELF] Linkerscript: fixed bug about commands processing.
It was possible situation about some commands just were not processed
(were skipped) because of a bug appeared when constraint checking used.
Testcase is attached.
llvm-svn: 281818
diff --git a/lld/ELF/LinkerScript.cpp b/lld/ELF/LinkerScript.cpp
index 7c1e2dd..d6f406e 100644
--- a/lld/ELF/LinkerScript.cpp
+++ b/lld/ELF/LinkerScript.cpp
@@ -297,6 +297,7 @@
for (InputSectionBase<ELFT> *S : V)
S->OutSec = nullptr;
Opt.Commands.erase(Iter);
+ --I;
continue;
}