[PATCH] D36712: Emit section information for extern variables

Eli Friedman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 23 12:45:34 PDT 2017


efriedma added a comment.

> If there is no section given explicitly, there is function SelectSectionForGlobal that will determine the section based on the properties of the global. If there is code that only sees the declaration, but needs to know the section, it will get it from that function.

SelectSectionForGlobal takes a SectionKind, and in general you can't compute the right SectionKind without knowing the initializer.  (See TargetLoweringObjectFile::getKindForGlobal.)


Repository:
  rL LLVM

https://reviews.llvm.org/D36712





More information about the cfe-commits mailing list