Prepare call/invoke for opaque pointers

Rather than relying on `getPointerElementType()` from LLVM function
pointers, we now pass the function type explicitly when building `call`
or `invoke` instructions.
This commit is contained in:
Josh Stone 2021-08-03 15:09:57 -07:00
parent 61a941b8ba
commit 183d79cc09
15 changed files with 168 additions and 151 deletions

View file

@ -1155,6 +1155,7 @@ extern "C" {
) -> &'a Value;
pub fn LLVMRustBuildInvoke(
B: &Builder<'a>,
Ty: &'a Type,
Fn: &'a Value,
Args: *const &'a Value,
NumArgs: c_uint,
@ -1526,6 +1527,7 @@ extern "C" {
pub fn LLVMRustGetInstrProfIncrementIntrinsic(M: &Module) -> &'a Value;
pub fn LLVMRustBuildCall(
B: &Builder<'a>,
Ty: &'a Type,
Fn: &'a Value,
Args: *const &'a Value,
NumArgs: c_uint,