aboutsummaryrefslogtreecommitdiffstats
path: root/docs/LangRef.rst
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2013-04-22 14:58:02 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2013-04-22 14:58:02 +0000
commitcde25b435a907e7741da0c0d18953850936277c4 (patch)
tree30353631edc608810481f7ad09e5163c2826d3f6 /docs/LangRef.rst
parent2c55362848eab1a8552a31f8da1a47d17105b4d9 (diff)
downloadexternal_llvm-cde25b435a907e7741da0c0d18953850936277c4.zip
external_llvm-cde25b435a907e7741da0c0d18953850936277c4.tar.gz
external_llvm-cde25b435a907e7741da0c0d18953850936277c4.tar.bz2
Clarify that llvm.used can contain aliases.
Also add a check for llvm.used in the verifier and simplify clients now that they can assume they have a ConstantArray. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180019 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'docs/LangRef.rst')
-rw-r--r--docs/LangRef.rst20
1 files changed, 10 insertions, 10 deletions
diff --git a/docs/LangRef.rst b/docs/LangRef.rst
index 7dafbb9..382314e 100644
--- a/docs/LangRef.rst
+++ b/docs/LangRef.rst
@@ -2868,9 +2868,9 @@ All globals of this sort should have a section specified as
The '``llvm.used``' Global Variable
-----------------------------------
-The ``@llvm.used`` global is an array with i8\* element type which has
-:ref:`appending linkage <linkage_appending>`. This array contains a list of
-pointers to global variables and functions which may optionally have a
+The ``@llvm.used`` global is an array which has
+ :ref:`appending linkage <linkage_appending>`. This array contains a list of
+pointers to global variables, functions and aliases which may optionally have a
pointer cast formed of bitcast or getelementptr. For example, a legal
use of it is:
@@ -2884,13 +2884,13 @@ use of it is:
i8* bitcast (i32* @Y to i8*)
], section "llvm.metadata"
-If a global variable appears in the ``@llvm.used`` list, then the
-compiler, assembler, and linker are required to treat the symbol as if
-there is a reference to the global that it cannot see. For example, if a
-variable has internal linkage and no references other than that from the
-``@llvm.used`` list, it cannot be deleted. This is commonly used to
-represent references from inline asms and other things the compiler
-cannot "see", and corresponds to "``attribute((used))``" in GNU C.
+If a symbol appears in the ``@llvm.used`` list, then the compiler, assembler,
+and linker are required to treat the symbol as if there is a reference to the
+symbol that it cannot see. For example, if a variable has internal linkage and
+no references other than that from the ``@llvm.used`` list, it cannot be
+deleted. This is commonly used to represent references from inline asms and
+other things the compiler cannot "see", and corresponds to
+"``attribute((used))``" in GNU C.
On some targets, the code generator must emit a directive to the
assembler or object file to prevent the assembler and linker from