[Lldb-commits] [PATCH] D127164: [WebAssembly] Add WASM_SEC_LAST_KNOWN to BinaryFormat section types list [NFC]

Derek Schuff via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Jun 6 17:15:47 PDT 2022


dschuff added inline comments.


================
Comment at: llvm/lib/ObjCopy/wasm/WasmReader.cpp:32-35
-    // If the section type is CUSTOM, it has a name already. If it's a new type
-    // of section that we don't explicitly handle here, it will have an empty
-    // name and objcopy won't be able to select it by name (e.g. for removal
-    // or dumping) but it will still be valid and able to be copied.
----------------
aheejin wrote:
> Why was this removed? It doesn't look like it's related to the last section thing.. It's just explaning custom sections have names already.
Checking against `WASM_SEC_LAST_KNOWN` ensures that there can't be a new type of section that we don't explicitly handle here (because no types of known sections are explicitly handled or mentioned); any section known to `sectionTypeToString` will work.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D127164



More information about the lldb-commits mailing list