[PATCH] D88355: [DWARFYAML] Make the opcode_base and the standard_opcode_lengths fields optional.
James Henderson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 30 00:20:48 PDT 2020
jhenderson added inline comments.
================
Comment at: llvm/lib/ObjectYAML/DWARFEmitter.cpp:557-564
+ // We return the standard_opcode_lengths defined in the latest DWARF sepc by
+ // default. If the opcode_base is specified, the standard_opcode_lengths will
+ // be truncated or extended according to the value.
+ std::vector<uint8_t> StandardOpcodeLengthsV5{0, 1, 1, 1, 1, 0,
+ 0, 0, 1, 0, 0, 1};
+ if (OpcodeBase)
+ StandardOpcodeLengthsV5.resize(*OpcodeBase > 0 ? *OpcodeBase - 1 : 0, 0);
----------------
I think you either misunderstood my comment or something else. You're still not using the `Version` parameter, and I think you should use that in determining what the standard opcode lengths should be if otherwise unspecified. See my previous out-of-line commentary, in particular point 1.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D88355/new/
https://reviews.llvm.org/D88355
More information about the llvm-commits
mailing list