[LLVMdev] Getting size of array allocations

aashays aashay.shringarpure at gatech.edu
Mon Apr 5 23:10:44 PDT 2010


Thanks a lot. That worked well.

me22 wrote:
> 
> 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.
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
> 
> 

-- 
View this message in context: http://old.nabble.com/Getting-size-of-array-allocations-tp28146893p28147812.html
Sent from the LLVM - Dev mailing list archive at Nabble.com.




More information about the llvm-dev mailing list