[PATCH] D79284: [llvm-objdump][ARM] Print inline relocations when dumping ARM data

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 4 12:22:15 PDT 2020


efriedma added inline comments.


================
Comment at: llvm/tools/llvm-objdump/llvm-objdump.cpp:1462-1467
+          DumpARMELFData = Kind == 'd';
+          if (SecondarySTI) {
+            if (Kind == 'a') {
+              STI = PrimaryIsThumb ? SecondarySTI : PrimarySTI;
+              DisAsm = PrimaryIsThumb ? SecondaryDisAsm : PrimaryDisAsm;
+            } else if (Kind == 't') {
----------------
MaskRay wrote:
> nickdesaulniers wrote:
> > Would this be simpler as a `switch (Kind)` or even `switch (getMappingSymbolKind(MappingSymbols, Index)`? Then the two cases for `'t'` and '`a'` could have the same body, and you could have another case for `'d'`.
> `SecondarySTI` is not always initialized (if the `+mclass` feature (I don't know what it is) is enabled). I tried but a switch would be more complex.
(`+mclass` indicates a CPU that only supports Thumb mode.)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D79284/new/

https://reviews.llvm.org/D79284





More information about the llvm-commits mailing list