From 2c882c2737b37fce034d9dc99aa07faa7442685c Mon Sep 17 00:00:00 2001 From: George Rimar Date: Thu, 13 Apr 2017 09:52:50 +0000 Subject: [PATCH] [DWARF] - Simplify (use dyn_cast instead of isa + cast). This addresses post commit review comments for r300039. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@300188 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/DebugInfo/DWARF/DWARFContext.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/DebugInfo/DWARF/DWARFContext.cpp b/lib/DebugInfo/DWARF/DWARFContext.cpp index ce5c4ae89e8..cbce2dc89de 100644 --- a/lib/DebugInfo/DWARF/DWARFContext.cpp +++ b/lib/DebugInfo/DWARF/DWARFContext.cpp @@ -667,11 +667,11 @@ static Expected getSymbolAddress(const object::ObjectFile &Obj, static bool isRelocScattered(const object::ObjectFile &Obj, const RelocationRef &Reloc) { - if (!isa(&Obj)) + const MachOObjectFile *MachObj = dyn_cast(&Obj); + if (!MachObj) return false; // MachO also has relocations that point to sections and // scattered relocations. - const MachOObjectFile *MachObj = cast(&Obj); auto RelocInfo = MachObj->getRelocation(Reloc.getRawDataRefImpl()); return MachObj->isRelocationScattered(RelocInfo); } -- 2.11.0