aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2026-04-05 20:32:53 +0100
committerMichael Williamson <mike@zwobble.org>2026-04-05 20:32:53 +0100
commit9eede8a0f7a482188c0650aece13d7cc33608c7d (patch)
tree74ad0078b68b5afa0dbd8991119394012b6aa4e2
parent9e5f327f06522ff52542ae2ab6fb257002d79766 (diff)
Support converting struct data value to bytes
-rw-r--r--patio-to-cranelift/src/lib.rs6
1 files changed, 5 insertions, 1 deletions
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);
+ }
+ }
}
}