summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-objdump
diff options
context:
space:
mode:
authorKevin Enderby <enderby@apple.com>2014-11-11 19:16:45 +0000
committerKevin Enderby <enderby@apple.com>2014-11-11 19:16:45 +0000
commit3eb73e1d393f25d869f81658b3336b0049400027 (patch)
tree9c41dd9bcd1a56d95d4a6512f29c6802a131068c /llvm/tools/llvm-objdump
parente904e85faf52e179eea69043c3a150700f8bd040 (diff)
downloadbcm5719-llvm-3eb73e1d393f25d869f81658b3336b0049400027.tar.gz
bcm5719-llvm-3eb73e1d393f25d869f81658b3336b0049400027.zip
Fix a warning about ‘r_type’ may be used uninitialized.
Thanks to Aaron Ballman for noticing this! llvm-svn: 221696
Diffstat (limited to 'llvm/tools/llvm-objdump')
-rw-r--r--llvm/tools/llvm-objdump/MachODump.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/tools/llvm-objdump/MachODump.cpp b/llvm/tools/llvm-objdump/MachODump.cpp
index 4129e99cf9d..8bc89174440 100644
--- a/llvm/tools/llvm-objdump/MachODump.cpp
+++ b/llvm/tools/llvm-objdump/MachODump.cpp
@@ -346,10 +346,10 @@ int SymbolizerGetOpInfo(void *DisInfo, uint64_t Pc, uint64_t Offset,
if (RelocOffset == sect_offset) {
Rel = Reloc.getRawDataRefImpl();
RE = info->O->getRelocation(Rel);
+ r_type = info->O->getAnyRelocationType(RE);
r_scattered = info->O->isRelocationScattered(RE);
if (r_scattered) {
r_value = info->O->getScatteredRelocationValue(RE);
- r_type = info->O->getScatteredRelocationType(RE);
if (r_type == MachO::GENERIC_RELOC_SECTDIFF ||
r_type == MachO::GENERIC_RELOC_LOCAL_SECTDIFF) {
DataRefImpl RelNext = Rel;
OpenPOWER on IntegriCloud