[PATCH] D36712: Emit section information for extern variables

Elizabeth Andrews via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 15 12:40:12 PDT 2017


eandrews updated this revision to Diff 111227.
eandrews added a comment.

I updated the documentation to include Simon's comments. I wasn't sure whether to include the line about section information being retained in LLVM IR, since Eli mentioned it could vary for different front-ends. I have included it in this revision.


https://reviews.llvm.org/D36712

Files:
  docs/LangRef.rst


Index: docs/LangRef.rst
===================================================================
--- docs/LangRef.rst
+++ docs/LangRef.rst
@@ -622,6 +622,12 @@
 Additionally, the global can placed in a comdat if the target has the necessary
 support.
 
+External declarations may have an explicit section specified. Section 
+information is retained in LLVM IR for targets that make use of this 
+information. Attaching section information to an external declaration is an 
+assertion that it's definition is located in the specified section. If the 
+definition is located in a different section, the behavior is undefined.   
+
 By default, global initializers are optimized by assuming that global
 variables defined within the module are not modified from their
 initial values before the start of the global initializer. This is


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D36712.111227.patch
Type: text/x-patch
Size: 829 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170815/660e68bb/attachment-0001.bin>


More information about the cfe-commits mailing list