There are 3 places where we were using WASM_SEC_TAG as the "last" known
section type, which requires updating (or leaves a bug) when a new known
section type is added. Instead add a "last type" to the enum for this
purpose.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Time | Test | |
---|---|---|
60,030 ms | x64 debian > MLIR.Examples/standalone::test.toy |
Event Timeline
llvm/include/llvm/BinaryFormat/Wasm.h | ||
---|---|---|
256 |
WAS_SEC_LAST_KNOWN = WASM_SEC_TAG; ? | |
llvm/lib/ObjCopy/wasm/WasmReader.cpp | ||
32–35 | 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. |
llvm/lib/ObjCopy/wasm/WasmReader.cpp | ||
---|---|---|
32–35 | 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. |
llvm/include/llvm/BinaryFormat/Wasm.h | ||
---|---|---|
256 | ah, no it doesnt pass clang-format. |
llvm/lib/ObjCopy/wasm/WasmReader.cpp | ||
---|---|---|
32–35 | I'm not sure if I understand. Is this related to WASM_SEC_TAG -> WASM_LAST_SEC_KNOWN change in this PR? Or it's just an unrelated drive-by fix?
I'm not sure what this means..
Why is this deleted too? How is the custom section related to WASM_SEC_LAST_KNOWN? |
llvm/lib/ObjCopy/wasm/WasmReader.cpp | ||
---|---|---|
32–35 | It is indirectly related. |
llvm/lib/ObjCopy/wasm/WasmReader.cpp | ||
---|---|---|
32–35 | I see. My original question was why
is related to this CL, but I see you moved that comment to elsewhere, so it hasn't really changed.. |
llvm/lib/ObjCopy/wasm/WasmReader.cpp | ||
---|---|---|
32–35 | Ah yeah that bit of explanation is still valuable. Thanks! |
?