[LLVMdev] Set alignment of a structure?

Chris Lattner clattner at apple.com
Thu May 7 09:19:03 PDT 2009


On May 7, 2009, at 8:53 AM, Nick Johnson wrote:

> Hello,
>
> Is it possible to set the alignment of a StructType in llvm?

Nope.  If this is for a global variable (For example), you build the  
ConstantStruct with a type that ensures that the elements get the  
right offsets, then you put the alignment on the GlobalVariable itself.

-Chris



More information about the llvm-dev mailing list