Merge remote-tracking branch 'remote/main' into upgrade-llvm-zig

This commit is contained in:
Luke Boswell 2024-11-13 09:02:20 +11:00
commit dc3aa06d61
No known key found for this signature in database
GPG key ID: F6DB3C9DB47377B0
661 changed files with 14834 additions and 10530 deletions

View file

@ -113,9 +113,13 @@ pub fn helper(
} => {
// TODO support multiple of these!
debug_assert_eq!(exposed_to_host.len(), 1);
let (symbol, layout) = exposed_to_host[0];
let (name, symbol, layout) = exposed_to_host[0];
SingleEntryPoint { symbol, layout }
SingleEntryPoint {
name,
symbol,
layout,
}
}
EntryPoint::Test => {
unreachable!()

View file

@ -241,9 +241,13 @@ fn create_llvm_module<'a>(
} => {
// TODO support multiple of these!
debug_assert_eq!(exposed_to_host.len(), 1);
let (symbol, layout) = exposed_to_host[0];
let (name, symbol, layout) = exposed_to_host[0];
SingleEntryPoint { symbol, layout }
SingleEntryPoint {
name,
symbol,
layout,
}
}
EntryPoint::Test => {
unreachable!()
@ -548,6 +552,7 @@ pub fn try_run_lib_function<T>(
}
}
#[allow(dead_code)]
// only used in tests
pub(crate) fn llvm_evals_to<T, U, F>(
src: &str,
@ -597,6 +602,7 @@ pub(crate) fn llvm_evals_to<T, U, F>(
}
}
#[allow(unused_macros)]
macro_rules! assert_llvm_evals_to {
($src:expr, $expected:expr, $ty:ty, $transform:expr, $ignore_problems:expr) => {
crate::helpers::llvm::llvm_evals_to::<$ty, _, _>(
@ -661,6 +667,7 @@ macro_rules! assert_evals_to {
}};
}
#[allow(unused_macros)]
macro_rules! assert_evals_to_erased {
($src:expr, $expected:expr, $ty:ty) => {{
crate::helpers::llvm::llvm_evals_to::<$ty, _, _>(
@ -673,12 +680,16 @@ macro_rules! assert_evals_to_erased {
}};
}
#[allow(dead_code)]
pub fn identity<T>(value: T) -> T {
value
}
#[allow(unused_imports)]
pub(crate) use assert_evals_to;
#[allow(unused_imports)]
pub(crate) use assert_evals_to_erased;
#[allow(unused_imports)]
pub(crate) use assert_llvm_evals_to;
#[cfg(feature = "gen-llvm-wasm")]
pub(crate) use assert_wasm_evals_to;