[llvm-commits] CVS: llvm/docs/LangRef.html

Chris Lattner lattner at cs.uiuc.edu
Fri Oct 10 00:02:01 PDT 2003


Changes in directory llvm/docs:

LangRef.html updated: 1.31 -> 1.32

---
Log message:

Add documentation for weak variables



---
Diffs of the changes:  (+10 -2)

Index: llvm/docs/LangRef.html
diff -u llvm/docs/LangRef.html:1.31 llvm/docs/LangRef.html:1.32
--- llvm/docs/LangRef.html:1.31	Mon Sep  8 13:27:49 2003
+++ llvm/docs/LangRef.html	Fri Oct 10 00:01:39 2003
@@ -541,7 +541,15 @@
 <dd>"<tt>linkonce</tt>" linkage is similar to <tt>internal</tt> linkage, with
 the twist that linking together two modules defining the same <tt>linkonce</tt>
 globals will cause one of the globals to be discarded.  This is typically used
-to implement inline functions.<p>
+to implement inline functions.  Unreferenced <tt>linkonce</tt> globals are
+allowed to be discarded.<p>
+
+<a name="linkage_weak">
+<dt><tt><b>weak</b></tt>:
+
+<dd>"<tt>weak</tt>" linkage is exactly the same as <tt>linkonce</tt> linkage,
+except that unreferenced <tt>weak</tt> globals may not be discarded.  This is
+used to implement constructs in C such as "<tt>int X;</tt>" at global scope.<p>
 
 <a name="linkage_appending">
 <dt><tt><b>appending</b></tt>:
@@ -1905,7 +1913,7 @@
 <address><a href="mailto:sabre at nondot.org">Chris Lattner</a></address>
 <!-- Created: Tue Jan 23 15:19:28 CST 2001 -->
 <!-- hhmts start -->
-Last modified: Mon Sep  8 13:27:14 CDT 2003
+Last modified: Thu Oct  9 23:58:41 CDT 2003
 <!-- hhmts end -->
 </font>
 </body></html>





More information about the llvm-commits mailing list