search for: func_dummy

Displaying 2 results from an estimated 2 matches for "func_dummy".

2012 Sep 19
0
[LLVMdev] newbie question on getelementptr
...stantInt* constI32_0 = ConstantInt::get(module->getContext(), APInt(32, StringRef("0"), 10)); indices.push_back(constI32_0); indices.push_back(constI32_0); Constant* result = ConstantExpr::getGetElementPtr(retrieved, indices); Function *func_dummy = cast<Function> ( module->getOrInsertFunction("dummy", Type::getVoidTy(module->getContext()), Type::getInt32Ty(module->getContext()), (Type *) 0)); // Add a basic block to the function. BasicB...
2012 Sep 19
3
[LLVMdev] newbie question on getelementptr
Hi All, I'm new to LLVM and I'm having a coding problem. I'm creating a GlobalVariable that contains a StructType that contains a Function. The function returns i32 and takes two i32's. Here is my code: GlobalVariable* retrieved = module->getGlobalVariable("myGV"); ... Constant* result = ConstantExpr::getGetElementPtr(retrieved, indices); How do I get my Function