Displaying 2 results from an estimated 2 matches for "isarrayalloc".
2010 Apr 06
2
[LLVMdev] Getting size of array allocations
...nerates the following alloca instruction:
%a = alloca [10 x i32]
This is different than the type of instruction generated by the AllocaInst
constructor, which is of the type:
%a = alloca i32, i32 10
Now, how do I go about extracting '10' as the array size from the first
alloca instruction? isArrayAllocation returns false and getArraySize returns
1.
Thanks,
--Aashay
--
View this message in context: http://old.nabble.com/Getting-size-of-array-allocations-tp28146893p28146893.html
Sent from the LLVM - Dev mailing list archive at Nabble.com.
2010 Apr 06
0
[LLVMdev] Getting size of array allocations
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.