Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
tools/llvm-readobj/WasmDumper.cpp | ||
---|---|---|
26 ↗ | (On Diff #80091) | I guess these are now "CUSTOM" sections. |
- Rename sections to
- Merge remote-tracking branch 'origin/master' into wasm_readobj_support
- Merge remote-tracking branch 'origin/master' into wasm_readobj_support
tools/llvm-readobj/WasmDumper.cpp | ||
---|---|---|
26 ↗ | (On Diff #80091) | Sure, I was going to make that a seperate CL but will do that now. |
tools/llvm-readobj/WasmDumper.cpp | ||
---|---|---|
57 ↗ | (On Diff #80475) | I wonder if we should have a field in the output for the name as well. Output for user sections wouldn't be very interesting without it, and it would be consistent with other formats which have names for every section. Obviously only user sections have interesting names that are different from their types, but it wouldn't hurt to also print "TABLE" or "EXPORT" or whatever for the standard sections as well. |
tools/llvm-readobj/WasmDumper.cpp | ||
---|---|---|
57 ↗ | (On Diff #80475) | Come to think of it, we should do that in llvm-objdump as well, so maybe that can just be a separate change. |
- Merge remote-tracking branch 'origin/master' into wasm_readobj_support
- Dump custom section name
I'd prefer to get at least a brief look by @Bigcheese or someone (suggestions, if not you?) that knows this part of the code better than I do, since we're creating something new here. Let's see if we can get a response now that people may be coming back from vacation.
test/tools/llvm-readobj/file-headers.test | ||
---|---|---|
29–31 ↗ | (On Diff #82171) | Please add a comment exaplining how you created the source file. That is: |
tools/llvm-readobj/WasmDumper.cpp | ||
1 ↗ | (On Diff #82171) | You may want to mention WASM Object file dumping utility ? |
85–88 ↗ | (On Diff #82171) | Can this always happen? You enter here under Obj->isWasm(). |
- Run clang-format
- Rename sections to
- clang-format
- Dump custom section name
- update comment
- Add rebuild instructions for trivial.obj.wasm
tools/llvm-readobj/WasmDumper.cpp | ||
---|---|---|
85–88 ↗ | (On Diff #82171) | This is exactly what the MachO and COFF dumpers do yes, and basically the same as the ELF dumper. You are correct that in practice there is no way this can happen, at least not by running the tool itself. In light of this I don't see how I can write a test to tickle this, and I think perhaps an assert would be more appropriate here? |
tools/llvm-readobj/WasmDumper.cpp | ||
---|---|---|
85–88 ↗ | (On Diff #82171) | Yes, that's what I would do. |
LGTM with the modification suggested in createWasmDumper (replace with an assertion).
Another minor comment (and thanks for your patience).
lib/Object/WasmObjectFile.cpp | ||
---|---|---|
86–89 ↗ | (On Diff #86343) | Also, clang-format the patch before submitting. This looks a little bit weirdly formatted but it could be just phab. |
lib/Object/WasmObjectFile.cpp | ||
---|---|---|
86–89 ↗ | (On Diff #86343) | This is what clang-format wants apparently. |