[lld] r299506 - Simplify. NFC.

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 5 02:34:54 PDT 2017


Sorry, I had to revert this in r299525.

It was not NFC unfortunaly,
one of changes decrements begin() iterator and
that is not allowed, MSVS asserts for me:

      if (!matchConstraints(V, Cmd->Constraint)) {
        for (InputSectionBase *S : V)
          S->Assigned = false;
        --It; // <- HERE
        Opt.Commands.erase(It + 1);
        continue;
      }

At first I wanted to fix it instead of reverting, but not sure my changes
looked better than initial code that had simplification as intention.

George.


More information about the llvm-commits mailing list