mirror of
https://github.com/intel/llvm.git
synced 2026-01-20 10:58:11 +08:00
Simplify. NFC.
llvm-svn: 305341
This commit is contained in:
@@ -680,8 +680,7 @@ void LinkerScript::removeEmptyCommands() {
|
||||
auto Pos = std::remove_if(
|
||||
Opt.Commands.begin(), Opt.Commands.end(), [&](BaseCommand *Base) {
|
||||
if (auto *Cmd = dyn_cast<OutputSectionCommand>(Base))
|
||||
return std::find(OutputSections.begin(), OutputSections.end(),
|
||||
Cmd->Sec) == OutputSections.end();
|
||||
return Cmd->Sec == nullptr;
|
||||
return false;
|
||||
});
|
||||
Opt.Commands.erase(Pos, Opt.Commands.end());
|
||||
|
||||
Reference in New Issue
Block a user