[llvm-dev] Converting i32** to [4 x i32]* ? (original) (raw)
Tim Northover via llvm-dev llvm-dev at lists.llvm.org
Sat Aug 12 07:32:32 PDT 2017
- Previous message: [llvm-dev] Converting i32** to [4 x i32]* ?
- Next message: [llvm-dev] Converting i32** to [4 x i32]* ?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 12 August 2017 at 04:13, Siddharth Bhat via llvm-dev <llvm-dev at lists.llvm.org> wrote:
What would the "correct form of GEP be"?
I don't think there is one. The types are not compatible. In your situation i32** is an array of N pointers to i32 arrays. [4 x i32]* is a contiguous array of 4N i32s.
If you really need to use a function that takes the second type then copying the data is the only option I see.
Cheers.
Tim.
- Previous message: [llvm-dev] Converting i32** to [4 x i32]* ?
- Next message: [llvm-dev] Converting i32** to [4 x i32]* ?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]