From 47891477c906594158c07a1e468a8ad36f4e0ebd Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sat, 12 Nov 2005 00:45:07 +0000 Subject: [PATCH] document sections llvm-svn: 24317 --- docs/LangRef.html | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/docs/LangRef.html b/docs/LangRef.html index dd02a9e4a29..70071e05f75 100644 --- a/docs/LangRef.html +++ b/docs/LangRef.html @@ -495,7 +495,8 @@ convention.

Global variables define regions of memory allocated at compilation time -instead of run-time. Global variables may optionally be initialized, and may +instead of run-time. Global variables may optionally be initialized, may have +an explicit section to be placed in, and may have an optional explicit alignment specified. A variable may be defined as a global "constant," which indicates that the contents of the variable will never be modified (enabling better @@ -518,6 +519,9 @@ variables always define a pointer to their "content" type because they describe a region of memory, and all memory objects in LLVM are accessed through pointers.

+

LLVM allows an explicit section to be specified for globals. If the target +supports it, it will emit globals to the section specified.

+

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 @@ -536,8 +540,8 @@ a power of 2.

LLVM function definitions consist of an optional linkage type, an optional calling convention, a return -type, a function name, a (possibly empty) argument list, an optional alignment, -an opening curly brace, +type, a function name, a (possibly empty) argument list, an optional section, +an optional alignment, an opening curly brace, a list of basic blocks, and a closing curly brace. LLVM function declarations are defined with the "declare" keyword, an optional calling convention, a return type, a function name, @@ -560,6 +564,9 @@ functions with the same name but different parameter lists or return values are considered different functions, and LLVM will resolve references to each appropriately.

+

LLVM allows an explicit section to be specified for functions. If the target +supports it, it will emit functions to the section specified.

+

An explicit alignment may be specified for a function. If not present, or if the alignment is set to zero, the alignment of the function is set by the target to whatever it feels convenient. If an explicit alignment is specified, the