[llvm-dev] Check if getElementPtr Operand
Bernard Nongpoh via llvm-dev
llvm-dev at lists.llvm.org
Fri Aug 12 03:34:54 PDT 2016
Hello,
consider the following IR code :
%count4 = getelementptr inbounds %struct.r32, %struct.r32* %cur.087, i64 0,
i32 4
How to check in the instruction, whether the operand is a structure or not
if(isa<GetElementPtrInst>(instruction))
{
GetElementPtrInst *getElementPtrInst=dyn_cast<GetElementPtrInst>(&instruction);
//check if getElemetPtrInst operands structure or array.
}
Thank You
regards,
Bernard Nongpoh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160812/096377eb/attachment.html>
More information about the llvm-dev
mailing list