[LLVMdev] Getting size of array allocations

me22 me22.ca at gmail.com
Mon Apr 5 21:12:36 PDT 2010


On 5 April 2010 22:27, aashays <aashay.shringarpure at gatech.edu> wrote:
>
> Now, how do I go about extracting '10' as the array size from the first
> alloca instruction? isArrayAllocation returns false and getArraySize returns
> 1.
>

As a guess, get the type of the first alloca instruction, [10 x i32],
and get the number of elements from the array type, rather than from
the alloca instruction.



More information about the llvm-dev mailing list