llvm-objdump only uses one MCInstrAnalysis object, so if ARM and Thumb
code is mixed in one object, or if an object is disassembled without
explicitly setting the triple to match the ISA used, then branch and
call targets will be printed incorrectly.
This could be fixed by creating two MCInstrAnalysis objects in
llvm-objdump, like we currently do for SubtargetInfo. However, I don't
think there's any reason we need two separate sub-classes of
MCInstrAnalysis, so instead these can be merged into one, and the ISA
determined by checking the opcode of the instruction.
Is it possible to find out from the MCInstrDesc whether something's an Arm or a Thumb instruction? If so, you could set Offset based on that, and then you wouldn't have to get it right in each individual switch case, including future updates.
It looks as if (Desc.TSFlags & FormMask) == ThumbFrm ought to do that, but that is based on quite a quick look, so I might be wrong about what it means.