search for: calleemethod

Displaying 1 result from an estimated 1 matches for "calleemethod".

Did you mean: call_method
2020 Jun 09
2
Implementing a VTable in LLVM
...0, i32 0 %7 = load %_VtableFoo*, %_VtableFoo** %6 %8 = getelementptr inbounds %_VtableFoo, %_VtableFoo* %7, i32 0, i32 0 %9 = load void (%Foo*, i32)*, void (%Foo*, i32)** %8 However, the builder->CreateLoad instruction corresponding to the line with %9 returns null: llvm::Function *calleeMethod = llvm::dyn_cast<llvm::Function>(builder->CreateLoad(calleeMethodPtr)); So if I then try to execute the following builder->CreateCall function I end up with a segmentation fault since calleeMethod is null: builder->CreateCall(calleeMethod, argVals); Under what circumstances would...