From 9eede8a0f7a482188c0650aece13d7cc33608c7d Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sun, 5 Apr 2026 20:32:53 +0100 Subject: Support converting struct data value to bytes --- patio-to-cranelift/src/lib.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/patio-to-cranelift/src/lib.rs b/patio-to-cranelift/src/lib.rs index 36b4b13f..55ea3173 100644 --- a/patio-to-cranelift/src/lib.rs +++ b/patio-to-cranelift/src/lib.rs @@ -1062,7 +1062,11 @@ fn write_data_value( bytes.write_all(&value.to_le_bytes()).unwrap(); } PatioDataValue::Int32(_) => todo!(), - PatioDataValue::Struct { elements: _ } => todo!(), + PatioDataValue::Struct { elements } => { + for element in elements { + write_data_value(element, bytes, target_triple); + } + } } } -- cgit v1.2.3