[LLVMdev] Structure Alignment

Anton Korobeynikov anton at korobeynikov.info
Thu Jun 4 14:02:37 PDT 2009


Hello,

> I had not applied the layout at run time, only during the emission of the .bc.
> Now it's running ok when I allocate the structure point at LLVM side, but, when
> I allocate the structure  pointer in the C side,
> the LLVM function does not acquire the double value correctly.
LLVM has no idea about any weird requirements of struct fields padding /
alignment. You have to insert necessary padding fields by yourself (as
all frontends do).

-- 
With best regards, Anton Korobeynikov.

Faculty of Mathematics & Mechanics, Saint Petersburg State University.




More information about the llvm-dev mailing list