add various wrappers for gpu code generation

This commit is contained in:
Manuel Drehwald
2025-07-02 16:35:57 -07:00
parent 634016478e
commit 5958ebe829
5 changed files with 140 additions and 2 deletions

View File

@@ -4,7 +4,7 @@ use libc::{c_char, c_uint};
use super::MetadataKindId;
use super::ffi::{AttributeKind, BasicBlock, Metadata, Module, Type, Value};
use crate::llvm::Bool;
use crate::llvm::{Bool, Builder};
#[link(name = "llvm-wrapper", kind = "static")]
unsafe extern "C" {
@@ -31,6 +31,14 @@ unsafe extern "C" {
index: c_uint,
kind: AttributeKind,
);
pub(crate) fn LLVMRustPositionBefore<'a>(B: &'a Builder<'_>, I: &'a Value);
pub(crate) fn LLVMRustPositionAfter<'a>(B: &'a Builder<'_>, I: &'a Value);
pub(crate) fn LLVMRustGetFunctionCall(
F: &Value,
name: *const c_char,
NameLen: libc::size_t,
) -> Option<&Value>;
}
unsafe extern "C" {