Hi All,<br><br>I'm new to LLVM and I'm having a coding problem.<br><br>I'm creating a GlobalVariable that contains a StructType that contains a Function. The function returns i32 and takes two i32's.<br><br>
Here is my code:<br>GlobalVariable* retrieved = module->getGlobalVariable("myGV");<br>...<br>Constant* result = ConstantExpr::getGetElementPtr(retrieved, indices);<br><br>How do I get my Function back from the Constant* result? I'd like to be able to run the function.<br>
<br>result->dump() shows the following:<br>i32 (i32, i32)** getelementptr inbounds (%myStruct* @myGV, i32 0, i32 0)<br><br>Many thanks,<br>Jay<br><br>