[PATCH] D107536: [BitcodeAnalyzer] allow a motivated user to dump BLOCKINFO
Mehdi AMINI via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Oct 9 17:15:57 PDT 2021
mehdi_amini added inline comments.
================
Comment at: llvm/lib/Bitcode/Reader/BitcodeAnalyzer.cpp:762
+ // block, so only do it if the user explicitly requests it.
+ DumpRecords = O && O->DumpBlockinfo;
}
----------------
woodruffw wrote:
> mehdi_amini wrote:
> >
> `O` is `Optional<BCDumpOptions>` here, so I think we need the `O && ...` check here.
>
> When I remove it, running `llvm-bcanalyzer` with no options (i.e. just `llvm-bcanalyzer foo.bc`) causes an abort in the `Optional`.
I don't quite get why, because the block is guarded by:
` if (O && !O->DumpBlockinfo)` ; how can we get here and `O &&` have any effect?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D107536/new/
https://reviews.llvm.org/D107536
More information about the llvm-commits
mailing list