我正在创建一个 LLVM 函数调用。如何将 void 指针作为参数传递给该调用。我有“_testFunc”作为我的函数,需要传递 void 指针作为参数。
llvm::Function *testFunc= m_mod->getFunction("_testFunc");
llvm::IRBuilder<> builder(instruction.getNextNode());
llvm::Value *arg = argument is void pointer
builder.CreateCall(testFunc, arg);
Run Code Online (Sandbox Code Playgroud)
所以这arg必须是一个空指针。