forked from OSchip/llvm-project
Suggested improvement by Rafael Espindola to use isa<> in a few places
instead of dyn_cast<>. llvm-svn: 208628
This commit is contained in:
parent
37c12d7343
commit
15e247100a
|
@ -182,19 +182,19 @@ static bool compareSymbolName(const NMSymbol &A, const NMSymbol &B) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static char isSymbolList64Bit(SymbolicFile *Obj) {
|
static char isSymbolList64Bit(SymbolicFile *Obj) {
|
||||||
if (dyn_cast<IRObjectFile>(Obj))
|
if (isa<IRObjectFile>(Obj))
|
||||||
return false;
|
return false;
|
||||||
else if (dyn_cast<COFFObjectFile>(Obj))
|
else if (isa<COFFObjectFile>(Obj))
|
||||||
return false;
|
return false;
|
||||||
else if (MachOObjectFile *MachO = dyn_cast<MachOObjectFile>(Obj))
|
else if (MachOObjectFile *MachO = dyn_cast<MachOObjectFile>(Obj))
|
||||||
return MachO->is64Bit();
|
return MachO->is64Bit();
|
||||||
else if (dyn_cast<ELF32LEObjectFile>(Obj))
|
else if (isa<ELF32LEObjectFile>(Obj))
|
||||||
return false;
|
return false;
|
||||||
else if (dyn_cast<ELF64LEObjectFile>(Obj))
|
else if (isa<ELF64LEObjectFile>(Obj))
|
||||||
return true;
|
return true;
|
||||||
else if (dyn_cast<ELF32BEObjectFile>(Obj))
|
else if (isa<ELF32BEObjectFile>(Obj))
|
||||||
return false;
|
return false;
|
||||||
else if(dyn_cast<ELF64BEObjectFile>(Obj))
|
else if(isa<ELF64BEObjectFile>(Obj))
|
||||||
return true;
|
return true;
|
||||||
else
|
else
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in New Issue