File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,8 @@ use crate::marker::PhantomCovariantLifetime;
3131// the pointer decay behavior in Rust, while otherwise matching Rust semantics.
3232// This attribute ensures that the compiler uses the correct ABI for functions
3333// like `extern "C" fn takes_va_list(va: VaList<'_>)` by passing `va` indirectly.
34+ //
35+ // The LLVM `BuiltinVaListKind` enumerates the `va_list` variations that LLVM supports.
3436crate :: cfg_select! {
3537 all(
3638 target_arch = "aarch64" ,
@@ -124,6 +126,23 @@ crate::cfg_select! {
124126 }
125127 }
126128
129+ all( target_arch = "hexagon" , target_env = "musl" ) => {
130+ /// Hexagon Musl implementation of a `va_list`.
131+ ///
132+ /// See the [LLVM source] for more details. On bare metal Hexagon uses an opaque pointer.
133+ ///
134+ /// [LLVM source]:
135+ /// https://github.com/llvm/llvm-project/blob/0cdc1b6dd4a870fc41d4b15ad97e0001882aba58/clang/lib/CodeGen/Targets/Hexagon.cpp#L407-L417
136+ #[ repr( C ) ]
137+ #[ derive( Debug ) ]
138+ #[ rustc_pass_indirectly_in_non_rustic_abis]
139+ struct VaListInner {
140+ __current_saved_reg_area_pointer: * const c_void,
141+ __saved_reg_area_end_pointer: * const c_void,
142+ __overflow_area_pointer: * const c_void,
143+ }
144+ }
145+
127146 // The fallback implementation, used for:
128147 //
129148 // - apple aarch64 (see https://github.com/rust-lang/rust/pull/56599)
You can’t perform that action at this time.
0 commit comments