search for: calleemethodptr

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

2020 Jun 09
2
Implementing a VTable in LLVM
...bounds %_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 builder->CreateLoad return null? Is the global vTable's memory not al...