Skip to content

Commit

Permalink
Identical code for different branches (CID 1254883)
Browse files Browse the repository at this point in the history
Reviewers: kledzik, rafael

Reviewed By: rafael

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D6303

llvm-svn: 228308
  • Loading branch information
sylvestre committed Feb 5, 2015
1 parent 4536c45 commit d0ee6da
Showing 1 changed file with 11 additions and 26 deletions.
37 changes: 11 additions & 26 deletions llvm/tools/llvm-objdump/MachODump.cpp
Expand Up @@ -1519,35 +1519,20 @@ int SymbolizerGetOpInfo(void *DisInfo, uint64_t Pc, uint64_t Offset,
const char *name = SymName.data();
op_info->AddSymbol.Present = 1;
op_info->AddSymbol.Name = name;
if (value != 0) {
switch (r_type) {
case MachO::ARM_RELOC_HALF:
if ((r_length & 0x1) == 1) {
op_info->Value = value << 16 | other_half;
op_info->VariantKind = LLVMDisassembler_VariantKind_ARM_HI16;
} else {
op_info->Value = other_half << 16 | value;
op_info->VariantKind = LLVMDisassembler_VariantKind_ARM_LO16;
}
break;
default:
break;
switch (r_type) {
case MachO::ARM_RELOC_HALF:
if ((r_length & 0x1) == 1) {
op_info->Value = value << 16 | other_half;
op_info->VariantKind = LLVMDisassembler_VariantKind_ARM_HI16;
} else {
op_info->Value = other_half << 16 | value;
op_info->VariantKind = LLVMDisassembler_VariantKind_ARM_LO16;
}
} else {
switch (r_type) {
case MachO::ARM_RELOC_HALF:
if ((r_length & 0x1) == 1) {
op_info->Value = value << 16 | other_half;
op_info->VariantKind = LLVMDisassembler_VariantKind_ARM_HI16;
} else {
op_info->Value = other_half << 16 | value;
op_info->VariantKind = LLVMDisassembler_VariantKind_ARM_LO16;
}
break;
default:
break;
default:
break;
}
}
}
return 1;
}
// If we have a branch that is not an external relocation entry then
Expand Down

0 comments on commit d0ee6da

Please sign in to comment.