[PATCH] D60376: [llvm-objdump] Align instructions to a tab stop

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 10 07:20:22 PDT 2019


MaskRay marked 2 inline comments as done.
MaskRay added inline comments.


================
Comment at: test/tools/llvm-objdump/X86/disassemble-align.s:4
+
+# -w/--wide is ignored. llvm-objdump always produces wide output.
+# RUN: llvm-objdump -wd -print-imm-hex %t | sed 'y/\t/ /' | FileCheck -strict-whitespace %s
----------------
jhenderson wrote:
> Since you did -w/--wide in a different change, you should probably remove the references to it from here.
This is to demonstrate that our output format is similar to that of `objdump -w`. I want to add a test for `--wide` `-w` and I think here is probably the best place. I'd be happy to move it to a difference place if you have a better suggestion.


================
Comment at: tools/llvm-objdump/llvm-objdump.cpp:609
+
+    {
+      formatted_raw_ostream FOS(OS);
----------------
jhenderson wrote:
> Why do you need to scope this block?
Let `~formatted_raw_ostream` call `flush()` before we call `IP.printInst(MI, OS, "", STI);`

This is required if `outs()` is buffered (e.g. when redirecting to a file)


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