From: Dale Johannesen Date: Fri, 23 May 2008 23:13:41 +0000 (+0000) Subject: Document common linkage. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=2307a7f0cfe0f0a5261175849d928bd9e4b78c0f;p=oota-llvm.git Document common linkage. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51517 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/docs/LangRef.html b/docs/LangRef.html index 27e28d35d60..25b9e026a26 100644 --- a/docs/LangRef.html +++ b/docs/LangRef.html @@ -466,7 +466,7 @@ All Global Variables and Functions have one of the following types of linkage:
-
internal
+
internal:
Global values with internal linkage are only directly accessible by objects in the current module. In particular, linking code into a module with @@ -485,14 +485,22 @@ All Global Variables and Functions have one of the following types of linkage: allowed to be discarded.
+
common:
+ +
"common" linkage is exactly the same as linkonce + linkage, except that unreferenced common globals may not be + discarded. This is used for globals that may be emitted in multiple + translation units, but that are not guaranteed to be emitted into every + translation unit that uses them. One example of this is tentative + definitions in C, such as "int X;" at global scope. +
+
weak:
-
"weak" linkage is exactly the same as linkonce linkage, - except that unreferenced weak globals may not be discarded. This is - used for globals that may be emitted in multiple translation units, but that - are not guaranteed to be emitted into every translation unit that uses them. - One example of this are common globals in C, such as "int X;" at - global scope. +
"weak" linkage is the same as common linkage, except + that some targets may choose to emit different assembly sequences for them + for target-dependent reasons. This is used for globals that are declared + "weak" in C source code.
appending: