[PATCH] D43406: Merge two small functions and add comments.

Sam Clegg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 16 13:00:29 PST 2018

sbc100 added a comment.

In https://reviews.llvm.org/D43406#1010680, @ruiu wrote:

> 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.

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).


More information about the llvm-commits mailing list