[PATCH] D43391: [WebAssembly] Separate out InputGlobal from InputChunk

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 16 11:01:05 PST 2018


ruiu added a comment.

I haven't looked at the details of this patch yet, but this class hierarchy doesn't honestly look good to me, because I think global variables are not really Chunks. Chunk basically represents a piece of bytes that is copied from input file to output file. I don't think that wasm global variables fall in that category. Maybe you can still find some common parts between global variables and chunks, but it doesn't necessarily mean that we should put them in the same class hierarchy. Keeping different things different is as important as finding commonality and factor it out. I believe in this case, we should keep them separated.

  InputChunk
    -> InputSection - new class, all the relocation stuff and section offsets
                      moved from InputChunk to here
      -> InputFunction
      -> InputSegment
    -> InputGlobal


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D43391





More information about the llvm-commits mailing list