diff options
author | Chris Lattner <sabre@nondot.org> | 2010-04-28 00:13:42 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-04-28 00:13:42 +0000 |
commit | ce99fa9e26027a21a4552d0d39f17853649833a9 (patch) | |
tree | 88cf8a62be1a16440bd5cf902b1d292d6fe75fbb /docs/LangRef.html | |
parent | a00adba6a7e9b0f6600cb6c8c627bb0c705d2f59 (diff) | |
download | external_llvm-ce99fa9e26027a21a4552d0d39f17853649833a9.zip external_llvm-ce99fa9e26027a21a4552d0d39f17853649833a9.tar.gz external_llvm-ce99fa9e26027a21a4552d0d39f17853649833a9.tar.bz2 |
improve the global variable alignment description.
it is not generally valid for targets to overalign
them when an alignment is specified.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102474 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'docs/LangRef.html')
-rw-r--r-- | docs/LangRef.html | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/docs/LangRef.html b/docs/LangRef.html index 414c7a0..05637ab 100644 --- a/docs/LangRef.html +++ b/docs/LangRef.html @@ -851,11 +851,14 @@ define i32 @main() { <i>; i32()* </i> <p>LLVM allows an explicit section to be specified for globals. If the target supports it, it will emit globals to the section specified.</p> -<p>An explicit alignment may be specified for a global. If not present, or if - the alignment is set to zero, the alignment of the global is set by the - target to whatever it feels convenient. If an explicit alignment is - specified, the global is forced to have at least that much alignment. All - alignments must be a power of 2.</p> +<p>An explicit alignment may be specified for a global, which must be a power + of 2. If not present, or if the alignment is set to zero, the alignment of + the global is set by the target to whatever it feels convenient. If an + explicit alignment is specified, the global is forced to have exactly that + alignment. Targets are not allowed to over-align the global in cases where + it is observable: for example, overaligning a global is observable if it has + an assigned section and higher alignment could cause holes between + consequtive globals.</p> <p>For example, the following defines a global in a numbered address space with an initializer, section, and alignment:</p> |