summaryrefslogtreecommitdiff
path: root/docs/LangRef.html
diff options
context:
space:
mode:
authorAnton Korobeynikov <asl@math.spbu.ru>2007-04-25 14:27:10 +0000
committerAnton Korobeynikov <asl@math.spbu.ru>2007-04-25 14:27:10 +0000
commit8b0a8c84da2030ee8f4440d5b60a8033de691222 (patch)
tree7b780ed0cf12403faeac0e65fb16bca29fda5dbf /docs/LangRef.html
parent24a3cc4c83e5edb25fadf7b8979a26b4451795c6 (diff)
downloadllvm-8b0a8c84da2030ee8f4440d5b60a8033de691222.tar.gz
llvm-8b0a8c84da2030ee8f4440d5b60a8033de691222.tar.bz2
llvm-8b0a8c84da2030ee8f4440d5b60a8033de691222.tar.xz
Implement aliases. This fixes PR1017 and it's dependent bugs. CFE part
will follow. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36435 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'docs/LangRef.html')
-rw-r--r--docs/LangRef.html35
1 files changed, 28 insertions, 7 deletions
diff --git a/docs/LangRef.html b/docs/LangRef.html
index 2fb27f6384..807d1047f6 100644
--- a/docs/LangRef.html
+++ b/docs/LangRef.html
@@ -498,7 +498,8 @@ outside of the current module.</p>
<p>It is illegal for a function <i>declaration</i>
to have any linkage type other than "externally visible", <tt>dllimport</tt>,
or <tt>extern_weak</tt>.</p>
-
+<p>Aliases can have only <tt>external</tt>, <tt>internal</tt> and <tt>weak</tt>
+linkages.
</div>
<!-- ======================================================================= -->
@@ -602,12 +603,11 @@ All Global Variables and Functions have one of the following visibility styles:
<p>Global variables define regions of memory allocated at compilation time
instead of run-time. Global variables may optionally be initialized, may have
-an explicit section to be placed in, and may
-have an optional explicit alignment specified. A variable may be defined as
-"thread_local", which means that it will not be shared by threads (each thread
-will have a separated copy of the variable).
-A variable may be defined as a global "constant," which indicates that the
-contents of the variable will <b>never</b> be modified (enabling better
+an explicit section to be placed in, and may have an optional explicit alignment
+specified. A variable may be defined as "thread_local", which means that it
+will not be shared by threads (each thread will have a separated copy of the
+variable). A variable may be defined as a global "constant," which indicates
+that the contents of the variable will <b>never</b> be modified (enabling better
optimization, allowing the global data to be placed in the read-only section of
an executable, etc). Note that variables that need runtime initialization
cannot be marked "constant" as there is a store to the variable.</p>
@@ -698,6 +698,27 @@ a power of 2.</p>
</div>
+
+<!-- ======================================================================= -->
+<div class="doc_subsection">
+ <a name="aliasstructure">Aliases</a>
+</div>
+<div class="doc_text">
+ <p>Aliases act as "second name" for the aliasee value (which can be either
+ function or global variable). Aliases may have an
+ optional <a href="#linkage">linkage type</a>, and an
+ optional <a href="#visibility">visibility style</a>.</p>
+
+ <h5>Syntax:</h5>
+
+ <pre>
+ @&lt;Name&gt; = [Linkage] [Visibility] alias &lt;AliaseeTy&gt; @&lt;Aliasee&gt;
+ </pre>
+
+</div>
+
+
+
<!-- ======================================================================= -->
<div class="doc_subsection"><a name="paramattrs">Parameter Attributes</a></div>
<div class="doc_text">