fn find_vtable_behind_cast<'ll>(vtable: &'ll Value) -> &'ll Value
Expand description
Get the global variable for the vtable.
When using global variables, we may have created an addrspacecast to get a pointer to the default address space if global variables are created in a different address space. For modifying the vtable, we need the real global variable. This function accepts either a global variable (which is simply returned), or an addrspacecast constant expression. If the given value is an addrspacecast, the cast is removed and the global variable behind the cast is returned.