[LLVMdev] Request documentation for global var syntax

Chris Lattner sabre at nondot.org
Sat Jan 13 16:35:27 PST 2007


On Thu, 11 Jan 2007, Schimmel, Mark wrote:
> file://docs/LangRef.html#globalvars
>
> The section describing the definition of global vars discusses that you
> can specify an alignment and can also specify a section.  Could someone
> provide an example that works in gccas in release 1.9 for both defining
> which section the var is assigned to and defining the variables
> alignment?

They are just comma separated:

%G = constant float 1.000000e+00, section "foo", align 4

> Also, is there another document that describes how you define sections
> and their attributes?

sections are target-specific, usually defined by the linker.

-Chris

-- 
http://nondot.org/sabre/
http://llvm.org/



More information about the llvm-dev mailing list