From 25839f02c68e00f91fbc92c954c2fc5524472032 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 10 Oct 2003 05:01:39 +0000 Subject: [PATCH] Add documentation for weak variables git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9001 91177308-0d34-0410-b5e6-96231b3b80d8 --- docs/LangRef.html | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/docs/LangRef.html b/docs/LangRef.html index 06cb68d0492..a4bab0e5770 100644 --- a/docs/LangRef.html +++ b/docs/LangRef.html @@ -541,7 +541,15 @@ or the idea of "anonymous namespaces" in C++.

"linkonce" linkage is similar to internal linkage, with the twist that linking together two modules defining the same linkonce globals will cause one of the globals to be discarded. This is typically used -to implement inline functions.

+to implement inline functions. Unreferenced linkonce globals are +allowed to be discarded.

+ + +

weak: + +
"weak" linkage is exactly the same as linkonce linkage, +except that unreferenced weak globals may not be discarded. This is +used to implement constructs in C such as "int X;" at global scope.

appending: @@ -1905,7 +1913,7 @@ arbitrarily complex and require memory allocation, for example.

Chris Lattner
-Last modified: Mon Sep 8 13:27:14 CDT 2003 +Last modified: Thu Oct 9 23:58:41 CDT 2003 -- 2.11.0