With the recent changes there should always be a 1:1 correspondence in
the correct order between OutputSections and OutputSectionCommands.
llvm-svn: 282176
Opt.Commands.insert(CmdIter,
llvm::make_unique<OutputSectionCommand>(Name));
} else {
- // If linker script lists alloc/non-alloc sections is the wrong order,
- // this does a rotate to bring the desired command in place.
- std::rotate(CmdIter, Pos, Pos + 1);
+ assert(Pos == CmdIter && "Section order doesn't match the linker script");
}
++CmdIndex;
}