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

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 11 20:01:47 PDT 2019


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


================
Comment at: tools/llvm-objdump/llvm-objdump.cpp:609
+
+    {
+      formatted_raw_ostream FOS(OS);
----------------
jhenderson wrote:
> MaskRay wrote:
> > 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)
> Okay. This probably deserves a comment then.
> 
> Alternatively, is it possible to just pass `FOS` into the `printInst` call?
Added a comment. `OS` is slightly more efficient if we don't need the column information. This curly brace also shows we don't need `FOS` after `FOS.indent()`.


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