[PATCH] D63115: [llvm-readobj] Fix output interleaving issue caused by using multiple streams at the same time.
Jordan Rupprecht via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 11 12:18:22 PDT 2019
rupprecht added inline comments.
================
Comment at: llvm/test/tools/llvm-readobj/check-output-order.test:7-9
+## TODO: Add a --all-debug option for llvm-readobj to turn on literally every
+## option, then copy the output of `llvm-readobj --all-debug` and paste
+## it into the CHECK line here.
----------------
There is an `--all` option that turns on: `--file-headers, --program-headers, --section-headers, --symbols, --relocations, --dynamic-table, --notes, --version-info, --unwind, --section-groups and --elf-hash-histogram`
Is that what you want here?
That said, checking the full content of `--all` in a test may be too verbose. Maybe just check a few lines from each section; enough to make sure they aren't interleaved.
================
Comment at: llvm/tools/llvm-readobj/ELFDumper.cpp:391-392
GNUStyle(ScopedPrinter &W, ELFDumper<ELFT> *Dumper)
- : DumpStyle<ELFT>(Dumper), OS(W.getOStream()) {}
+ : DumpStyle<ELFT>(Dumper),
+ OS(static_cast<formatted_raw_ostream&>(W.getOStream())) {}
----------------
I don't understand this part of the change. `W.getOStream()` is a `raw_ostream` and can't be casted to a subclass. What this is doing is strange -- I'm not sure how it compiles.
I don't think the change to this file is actually necessary, is it?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D63115/new/
https://reviews.llvm.org/D63115
More information about the llvm-commits
mailing list