From a97b694c823eb346d255ca04724f4003f9056800 Mon Sep 17 00:00:00 2001 From: Anton Korobeynikov Date: Wed, 25 Apr 2007 14:27:10 +0000 Subject: Implement aliases. This fixes PR1017 and it's dependent bugs. CFE part will follow. llvm-svn: 36435 --- llvm/docs/LangRef.html | 35 ++++++++++++++++++++++++++++------- 1 file changed, 28 insertions(+), 7 deletions(-) (limited to 'llvm/docs/LangRef.html') diff --git a/llvm/docs/LangRef.html b/llvm/docs/LangRef.html index 2fb27f6384a..807d1047f61 100644 --- a/llvm/docs/LangRef.html +++ b/llvm/docs/LangRef.html @@ -498,7 +498,8 @@ outside of the current module.

It is illegal for a function declaration to have any linkage type other than "externally visible", dllimport, or extern_weak.

- +

Aliases can have only external, internal and weak +linkages. @@ -602,12 +603,11 @@ All Global Variables and Functions have one of the following visibility styles:

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 never 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 never 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.

@@ -698,6 +698,27 @@ a power of 2.

+ + +
+ Aliases +
+
+

Aliases act as "second name" for the aliasee value (which can be either + function or global variable). Aliases may have an + optional linkage type, and an + optional visibility style.

+ +
Syntax:
+ +
+    @<Name> = [Linkage] [Visibility] alias <AliaseeTy> @<Aliasee>
+  
+ +
+ + +
Parameter Attributes
-- cgit v1.2.3