[PATCH] D49822: [GlobalMerge] Allow merging globals with explicit section markings.

David Greene via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 26 10:32:30 PDT 2018


greened added a comment.

Not sure I'm qualified to comment on the correctness/desirability of this.  I don't really deal with ELF or linkage issues.  I don't know if some tool might want to know about two symbols with the same section marking.



================
Comment at: lib/CodeGen/GlobalMerge.cpp:466
+      if (Globals[j]->hasSection() && Globals[j]->getAlignment())
+        Align = Globals[j]->getAlignment();
       unsigned Padding = alignTo(MergedSize, Align) - MergedSize;
----------------
Comment here about why this overrides getPreferredAlignment?


Repository:
  rL LLVM

https://reviews.llvm.org/D49822





More information about the llvm-commits mailing list