[PATCH] D104699: [llvm-objdump] Print comments for the disassembled code

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 23 12:00:33 PDT 2021


MaskRay accepted this revision.
MaskRay added inline comments.


================
Comment at: llvm/tools/llvm-objdump/llvm-objdump.cpp:1427
+
+          IP->setCommentStream(llvm::nulls());
 
----------------
ikudrin wrote:
> jhenderson wrote:
> > I'm not really up-to-speed on a lot of the MC stuff, but is there a need to do this?
> `CommentStream` is local to the function while `IP` is external, thus the provided reference should be removed. We could set the comment stream somewhere at the top of the function, where it is created, and remove it at the end, but the function is very long and these phases would be too far away from each other. Such code would be a bit fragile to my taste and could be broken unintentionally during development.
Does this mean that adding a no-comment instruction to the test file can increase coverage?


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

https://reviews.llvm.org/D104699



More information about the llvm-commits mailing list