<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Hi all,</div><div>I'm still working on the Interpreter class and I would like to understand why an operand cannot be cast to GetElementPtrInst.</div><div><br></div><div>My code is something like:</div><div><br></div><div>void MyInterpreter::visitCallInst(CallInst& I)<br>{</div><div>    for(int i = 0; i < I.getNumArgOperands(); i++) {<br>            operand = I.getOperand(i);</div><div><br></div><div>            if(GetElementPtrInst* CI = dyn_cast<GetElementPtrInst>(operand)) {<br>                errs() << "GEP\n";<br>            } else {<br>                operand->dump();<br>            }<br> </div><div>}</div><div><br></div><div>The specific output is:</div><div><br></div><div>i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str1, i32 0, i32 0)</div><div><br></div><div>and str1 is @.str1 = private unnamed_addr constant [7 x i8] c"1.2.34\00", align 1</div><div><br></div><div>I think it does not work because str1 is a "private constant". Is there a way to solve it?</div><div><br></div><div>Thanks<br></div><div><br></div></div></div></div></div></div></div>