[PATCH] D60376: [llvm-objdump] Align instructions to a tab stop
James Henderson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 12 02:57:28 PDT 2019
jhenderson added inline comments.
================
Comment at: tools/llvm-objdump/llvm-objdump.cpp:622
+ unsigned Column = FOS.getColumn();
+ FOS.indent(Column < TabStop - 1 ? TabStop - 1 - Column : 7 - Column % 8);
+
----------------
I can never remember the precedence of `%`, so would you mind adding some brackets to the LHS.
`7 - Column` seems a bit weird given that `Column` is always going to be bigger than that. Could you rewrite this bit so that it doesn't rely on underflowing?
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D60376/new/
https://reviews.llvm.org/D60376
More information about the llvm-commits
mailing list