summaryrefslogtreecommitdiffstats
path: root/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
diff options
context:
space:
mode:
authorGeorge Rimar <grimar@accesssoftek.com>2017-04-13 09:52:50 +0000
committerGeorge Rimar <grimar@accesssoftek.com>2017-04-13 09:52:50 +0000
commitd4998b0344b4cd647950f3f3ac2a23d3aadfd4e8 (patch)
tree372db7cc2319ef7dd2e97fced42738938798608d /llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
parentb3241f41b21016a7c2dbdd7efdd6bfa08cebc53d (diff)
downloadbcm5719-llvm-d4998b0344b4cd647950f3f3ac2a23d3aadfd4e8.tar.gz
bcm5719-llvm-d4998b0344b4cd647950f3f3ac2a23d3aadfd4e8.zip
[DWARF] - Simplify (use dyn_cast instead of isa + cast).
This addresses post commit review comments for r300039. llvm-svn: 300188
Diffstat (limited to 'llvm/lib/DebugInfo/DWARF/DWARFContext.cpp')
-rw-r--r--llvm/lib/DebugInfo/DWARF/DWARFContext.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp b/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
index ce5c4ae89e8..cbce2dc89de 100644
--- a/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
+++ b/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
@@ -667,11 +667,11 @@ static Expected<uint64_t> getSymbolAddress(const object::ObjectFile &Obj,
static bool isRelocScattered(const object::ObjectFile &Obj,
const RelocationRef &Reloc) {
- if (!isa<MachOObjectFile>(&Obj))
+ const MachOObjectFile *MachObj = dyn_cast<MachOObjectFile>(&Obj);
+ if (!MachObj)
return false;
// MachO also has relocations that point to sections and
// scattered relocations.
- const MachOObjectFile *MachObj = cast<MachOObjectFile>(&Obj);
auto RelocInfo = MachObj->getRelocation(Reloc.getRawDataRefImpl());
return MachObj->isRelocationScattered(RelocInfo);
}
OpenPOWER on IntegriCloud