[LLVMdev] How to pass an array to a function using GenericValue
Duncan Sands
baldrick at free.fr
Thu Jan 12 10:03:12 PST 2012
Hi Alan,
> if I have the following LLVM assembly code:
>
> define void @test(double* %data) {
>
> %1 = getelementptr inbounds double* %data, i64 1
>
> store double 1.230000e+02, double* %1, align 8
>
> %2 = getelementptr inbounds double* %data, i64 3
>
> store double 1.230000e+02, double* %2, align 8
>
> ret void
>
> }
is this the entire LLVM IR? If so you should probably add targetdata to it
since otherwise (IIRC) it may assume things about the target that aren't
true for your machine.
Ciao, Duncan.
More information about the llvm-dev
mailing list