[llvm] Use isa instead of dyn_cast (NFC)

This commit is contained in:
Kazu Hirata 2021-01-01 12:44:56 -08:00
parent 6b0d4e7fd3
commit 586535f9e6
2 changed files with 3 additions and 4 deletions

View File

@ -1095,9 +1095,8 @@ static char getSymbolNMTypeChar(IRObjectFile &Obj, basic_symbol_iterator I) {
}
static bool isObject(SymbolicFile &Obj, basic_symbol_iterator I) {
return !dyn_cast<ELFObjectFileBase>(&Obj)
? false
: elf_symbol_iterator(I)->getELFType() == ELF::STT_OBJECT;
return isa<ELFObjectFileBase>(&Obj) &&
elf_symbol_iterator(I)->getELFType() == ELF::STT_OBJECT;
}
// For ELF object files, Set TypeName to the symbol typename, to be printed

View File

@ -1193,7 +1193,7 @@ bool FilterChooser::emitPredicateMatch(raw_ostream &o, unsigned &Indentation,
if (!Pred->getValue("AssemblerMatcherPredicate"))
continue;
if (!dyn_cast<DagInit>(Pred->getValue("AssemblerCondDag")->getValue()))
if (!isa<DagInit>(Pred->getValue("AssemblerCondDag")->getValue()))
continue;
const DagInit *D = Pred->getValueAsDag("AssemblerCondDag");