[PATCH] D53128: [LLD] [COFF] Set proper pointer size alignment for LocalImportChunk

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 11 08:23:20 PDT 2018


ruiu accepted this revision.
ruiu added a comment.
This revision is now accepted and ready to land.

LGTM



================
Comment at: COFF/Chunks.h:372
+  explicit LocalImportChunk(Defined *S) : Sym(S) {
+    Alignment = getSize();
+  }
----------------
I'd write `Alignment = Config->Is64 ? 8 : 4;` instead of getSize() because it can be understood without reading getSize(). (I wondered whether or not getSize() returns a large value such as 16 when I read this code for the first time.)


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D53128





More information about the llvm-commits mailing list