stage2 codegen: Add generateSymbol for optional stub

This commit is contained in:
joachimschmidt557
2022-01-01 12:51:29 +01:00
parent 845531dde1
commit a722e1fc0b
2 changed files with 15 additions and 6 deletions

View File

@@ -400,6 +400,14 @@ pub fn generateSymbol(
return Result{ .appended = {} };
},
.Optional => {
// TODO generateSymbol for optionals
const target = bin_file.options.target;
const abi_size = try math.cast(usize, typed_value.ty.abiSize(target));
try code.writer().writeByteNTimes(0xaa, abi_size);
return Result{ .appended = {} };
},
else => |t| {
return Result{
.fail = try ErrorMsg.create(