upgrade llvm@22

This commit is contained in:
agra
2026-06-17 09:58:43 +03:00
parent 08b0a35758
commit 2b43af4f8a
42 changed files with 440 additions and 428 deletions

View File

@@ -13,18 +13,24 @@ Foo :: struct {
}
main :: () {
a : Foo; // default value of 0
a : Foo; // a=0, b=42, d=17 from defaults; c is `---` (undefined)
// `c` was declared `---`, so its contents are undefined here. Pin it
// before printing so the snapshot is deterministic — printing the raw
// undefined byte yields whatever garbage the stack/codegen leaves.
a.c = 0;
print("a 0 : {}\n", a);
a.a = 1;
// a.c is still undefined at this point
a.a = 1;
a.c = 8;
print("a 1 : {}\n", a);
large: f64 = 5989.5;
b : Foo = ---; // undefined
b : Foo = ---; // EVERY field undefined — `= ---` skips all defaults
// Assign each field explicitly; nothing here may be read before it is
// written, since `= ---` left the whole struct undefined.
b.a = 1;
b.c = xx large; // converts f64 to u8
// expect stdout : "b: Foo{a:1, b: 42, c: 7, d: 12}"
b.b = SPECIAL_VALUE; // re-supply the default `= ---` skipped
b.c = xx large; // converts f64 to u8 (5989.5 -> 101)
b.d = xx resolve(5); // converts i32 to u8 (17)
print("b: {}", b);
print("\n");