From e838773b6317809edd97a3d9a97abbed0559fb0e 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 llvm-svn: 9001 --- llvm/docs/LangRef.html | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/llvm/docs/LangRef.html b/llvm/docs/LangRef.html index 06cb68d0492f..a4bab0e57709 100644 --- a/llvm/docs/LangRef.html +++ b/llvm/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