[ELF] - Convert excessive dyn_cast -> cast. NFC.

Currently, there are only OutputSection and SymbolAssignment
commands possible at the first level under SECTIONS tag.

Hence, dyn_cast was excessive.

llvm-svn: 336354
This commit is contained in:
George Rimar 2018-07-05 14:09:47 +00:00
parent d87b1eed8e
commit ccf0db9974
1 changed files with 2 additions and 3 deletions

View File

@ -248,13 +248,12 @@ void LinkerScript::declareSymbols() {
declareSymbol(Cmd);
continue;
}
auto *Sec = dyn_cast<OutputSection>(Base);
if (!Sec)
continue;
// If the output section directive has constraints,
// we can't say for sure if it is going to be included or not.
// Skip such sections for now. Improve the checks if we ever
// need symbols from that sections to be declared early.
auto *Sec = cast<OutputSection>(Base);
if (Sec->Constraint != ConstraintKind::NoConstraint)
continue;
for (BaseCommand *Base2 : Sec->SectionCommands)