Copy user-defined custom sections into the output, concatenating
sections with the same name.
Details
Diff Detail
- Repository
- rLLD LLVM Linker
- Build Status
Buildable 16796 Build 16796: arc lint + arc unit
Event Timeline
I think overall it is looking good.
wasm/InputChunks.h | ||
---|---|---|
185 | If you move this to .cpp, can you remove #include "LEB128.h"? Please add a comment what this code is doing. | |
196 | It may make sense to do this in the ctor and store an ArrayRef instead of an size_t offset as a member. | |
198–200 | What is this function? Please add a comment to InputChunk class. | |
wasm/OutputSections.h | ||
116 | Please add a class comment. | |
118 | I wouldn't add explicit because it is hard to accidentally trigger implicit type conversion for this class. | |
wasm/Writer.cpp | ||
314 | Are you sure that these section names don't start with "."? | |
330 | You can eliminate this variable. |
wasm/Writer.cpp | ||
---|---|---|
314 | Yes. These sections are all created explicitly with these names |
wasm/OutputSections.h | ||
---|---|---|
116 | Can you expand the comment so that those who don't really now what "custom section" is can understand this comment? Currently, in order to understand this comment, you need to know what custom section is before reading this comment. You need to explain that in wasm, text, data, and some other sections are special sections that are identified by type, and unlike other file formats, they don't have name. However, you can still add sections that don't have special type and have name just like normal sections in other file formats, and such sections are called "custom sections" in wasm. | |
wasm/Writer.cpp | ||
304–305 | nit: we omit { if the content is only one line. |
If you move this to .cpp, can you remove #include "LEB128.h"?
Please add a comment what this code is doing.