From 4188aadbb24e10a2afbd7ed9b09b8fbf16ac4d88 Mon Sep 17 00:00:00 2001 From: Dale Johannesen Date: Fri, 23 May 2008 23:13:41 +0000 Subject: [PATCH] Document common linkage. llvm-svn: 51517 --- llvm/docs/LangRef.html | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/llvm/docs/LangRef.html b/llvm/docs/LangRef.html index 27e28d35d604..25b9e026a26d 100644 --- a/llvm/docs/LangRef.html +++ b/llvm/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: