[Mips] Simplify the code a bit using early return

No functional changes.

llvm-svn: 235708
This commit is contained in:
Simon Atanasyan 2015-04-24 11:14:24 +00:00
parent 775954be1e
commit e10a258527
1 changed files with 6 additions and 14 deletions

View File

@ -734,21 +734,13 @@ bool RelocationPass<ELFT>::isDynamic(const Atom *atom) const {
const auto *da = dyn_cast<const DefinedAtom>(atom);
if (da && da->dynamicExport() == DefinedAtom::dynamicExportAlways)
return true;
const auto *sa = dyn_cast<SharedLibraryAtom>(atom);
if (sa)
if (isa<SharedLibraryAtom>(atom))
return true;
if (_ctx.getOutputELFType() == ET_DYN) {
if (da && da->scope() != DefinedAtom::scopeTranslationUnit)
return true;
const auto *ua = dyn_cast<UndefinedAtom>(atom);
if (ua)
return true;
}
return false;
if (_ctx.getOutputELFType() != ET_DYN)
return false;
if (da && da->scope() != DefinedAtom::scopeTranslationUnit)
return true;
return isa<UndefinedAtom>(atom);
}
template <typename ELFT>