Merge two small functions and add comments.
Details
Diff Detail
- Repository
- rLLD LLVM Linker
Event Timeline
By the way, what is InputChunk::copyRelocations for? That function copies relocations from other InputChunk, but it's not clear to me why we need to do that.
lld/wasm/InputChunks.cpp | ||
---|---|---|
79 ↗ | (On Diff #134696) | Why not both? :) |
Its makes a copy of the relocations that apply to that particular chunk. They are used later in calcRelocations, but I imagine they could be merged.
(BTW, We are considering moving to a model where relocations would be stored on a per-chunk, rather than per section basis, to avoid this linear search, which seems rather pointless).
lld/wasm/InputChunks.cpp | ||
---|---|---|
79 ↗ | (On Diff #134696) | Not sure that makes sense. It means the old probably of comments being out-of-date is now double because the can also be out of date with themselves! :) |
lld/wasm/InputChunks.cpp | ||
---|---|---|
79 ↗ | (On Diff #134696) | writeTo() is actually pretty stable interface and I don't think it would change. But if you don't want to have duplicate comments, I can remove it from, perhaps, .h file, because we have bunch of comments in this file rather than in the .h file. |
lld/wasm/InputChunks.cpp | ||
---|---|---|
79 ↗ | (On Diff #134696) | I don't feel strongly but I feel like we should probably be consistent and decide which we prefer (.h or .cpp). No urgent need to fix this one now. |
lld/wasm/InputChunks.cpp | ||
---|---|---|
79 ↗ | (On Diff #134696) | I'll go ahead with removing the comment from .h file because it is at least consistent with the local convention in this file. |