Displaying 1 result from an estimated 1 matches for "_var_y0".
2020 Jun 09
2
Implementing a VTable in LLVM
...ate the correct IR (create an object, store a pointer to its vtable) - https://github.com/mukul-rathi/bolt/blob/vtable/src/llvm-backend/llvm_ir_codegen/expr_codegen.cc#L66:L89 <https://github.com/mukul-rathi/bolt/blob/vtable/src/llvm-backend/llvm_ir_codegen/expr_codegen.cc#L66:L89>
entry:
%_var_y0 = alloca %Foo*
%0 = call i8* @malloc(i64 ptrtoint (%Foo* getelementptr (%Foo, %Foo* null, i64 1) to i64))
%1 = bitcast i8* %0 to %Foo*
%2 = getelementptr inbounds %Foo, %Foo* %1, i32 0, i32 0
store %_VtableFoo* @_VtableFoo, %_VtableFoo** %2
The issue is when it comes to actually calling...