How to get the array size of GetElementPtrInst->getPointerOperand() ?

If I dump the Value of GetElementPtrInst->getPointerOperand(), I got this:

%a = alloca [10 x i32], align 16

Obviously, there should be a way to get the dimension and element type via the “Value” returned from GetElementPtrInst->getPointerOperand(), but how?

What kind of “Value” is this?


OK, figured out. The value is an Instruction, the AllocaInst.