Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Thanks!
llvm/tools/llvm-readobj/COFFDumper.cpp | ||
---|---|---|
864 | You can simplify the code and eliminate all these else clauses by changing this condition above in printRVATable: if (PrintExtra) PrintExtra(OS, reinterpret_cast<const uint8_t *>(I)); >> if (EntrySize == 5) PrintExtra(OS, reinterpret_cast<const uint8_t *>(I)); It's not general to more than a byte of flags, but that's true already. |
Replaced the previous ehcont test with the new one, as it tests nothing the new one doesn't
@rnk Removed the duplicated ifs. Technically the flags are not defined at all for anything but the CF table, so we could straight up just ignore them, but we don't decode them in the CF table either and instead just dump them out in hex, so might as well just do the same for the rest.
llvm/tools/llvm-readobj/COFFDumper.cpp | ||
---|---|---|
947 | This broke compilation with GCC: ../tools/llvm-readobj/COFFDumper.cpp: In member function ‘virtual void {anonymous}::COFFDumper::printCOFFLoadConfig()’: ../tools/llvm-readobj/COFFDumper.cpp:947:41: error: operands to ‘?:’ have different types ‘{anonymous}::COFFDumper::printCOFFLoadConfig()::<lambda(llvm::raw_ostream&, const uint8_t*)>’ and ‘std::nullptr_t’ 947 | PrintExtraCB PrintExtra = Stride == 1 ? PrintGuardFlags : nullptr; | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~ |
llvm/tools/llvm-readobj/COFFDumper.cpp | ||
---|---|---|
947 | Quick-fix pushed up just now. Seems to have worked. |
You can see where the eh cont table was added here: https://reviews.llvm.org/D99078
lld/COFF/Writer.cpp | ||
---|---|---|
1799 | I think with this change the final parameter of maybeAddRVATable is completely dead. Would you please make a follow up change to remove the code for it? | |
1876 | We don't need RVAFlagTableChunk anymore. |
lld/COFF/Writer.cpp | ||
---|---|---|
1799 | I wasn't sure about throwing out all that code since strides exist for a reason, which is the suppression flags (currently unsupported by lld). I guess if (when) someone starts caring about them they can just add it back, in some actually usable way, as in the current one you can't actually control the contents (it's always 0). Will make a follow-up with the removals. |
I think with this change the final parameter of maybeAddRVATable is completely dead. Would you please make a follow up change to remove the code for it?