Suggested improvement by Rafael Espindola to use isa<> in a few places
authorKevin Enderby <enderby@apple.com>
Mon, 12 May 2014 20:45:00 +0000 (20:45 +0000)
committerKevin Enderby <enderby@apple.com>
Mon, 12 May 2014 20:45:00 +0000 (20:45 +0000)
instead of dyn_cast<>.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208628 91177308-0d34-0410-b5e6-96231b3b80d8

tools/llvm-nm/llvm-nm.cpp

index 4bf9178845fc0f959a2dda430f139602e9e123da..0a1491b846755f59ce73ef9dfb12d59667e8e850 100644 (file)
@@ -182,19 +182,19 @@ static bool compareSymbolName(const NMSymbol &A, const NMSymbol &B) {
 }
 
 static char isSymbolList64Bit(SymbolicFile *Obj) {
-  if (dyn_cast<IRObjectFile>(Obj))
+  if (isa<IRObjectFile>(Obj))
     return false;
-  else if (dyn_cast<COFFObjectFile>(Obj))
+  else if (isa<COFFObjectFile>(Obj))
     return false;
   else if (MachOObjectFile *MachO = dyn_cast<MachOObjectFile>(Obj))
     return MachO->is64Bit();
-  else if (dyn_cast<ELF32LEObjectFile>(Obj))
+  else if (isa<ELF32LEObjectFile>(Obj))
     return false;
-  else if (dyn_cast<ELF64LEObjectFile>(Obj))
+  else if (isa<ELF64LEObjectFile>(Obj))
     return true;
-  else if (dyn_cast<ELF32BEObjectFile>(Obj))
+  else if (isa<ELF32BEObjectFile>(Obj))
     return false;
-  else if(dyn_cast<ELF64BEObjectFile>(Obj))
+  else if(isa<ELF64BEObjectFile>(Obj))
     return true;
   else
     return false;