[haskell-llvm] Generating a structure at runtime
Henning Thielemann
lemming at henning-thielemann.de
Fri Jul 8 17:02:25 BST 2011
On Fri, 8 Jul 2011, Nathan Howell wrote:
> On Fri, Jul 8, 2011 at 8:44 AM, Henning Thielemann <schlepptop at henning-thielemann.de> wrote:
> The Haskell-llvm package is concerned with generating compilable LLVM bitcode. unsafeGetElementPtr cannot warrant
> this. unsafeGetElementPtr is unnecessary if you cast the pointers. I would prefer this way.
>
>
> Cast my struct to a char* and calculate the alignment and layout manually?
I see, this is the problem. But you have to construct the Struct at
run-time somehow, right? Then you should also be able to construct the
right type for the struct-pointer that you pass to (unsafe)getElementPtr.
More information about the Haskell-llvm
mailing list