| ... | @@ -19,7 +19,7 @@ pub fn preprocess( | ... | @@ -19,7 +19,7 @@ pub fn preprocess( |
| 19 | var driver: aro.Driver = .{ .comp = comp, .diagnostics = comp.diagnostics, .aro_name = "arocc" }; | 19 | var driver: aro.Driver = .{ .comp = comp, .diagnostics = comp.diagnostics, .aro_name = "arocc" }; |
| 20 | defer driver.deinit(); | 20 | defer driver.deinit(); |
| 21 | | 21 | |
| 22 | var macro_buf: std.ArrayListUnmanaged(u8) = .empty; | 22 | var macro_buf: std.ArrayList(u8) = .empty; |
| 23 | defer macro_buf.deinit(comp.gpa); | 23 | defer macro_buf.deinit(comp.gpa); |
| 24 | | 24 | |
| 25 | var discard_buffer: [64]u8 = undefined; | 25 | var discard_buffer: [64]u8 = undefined; |
| ... | @@ -66,9 +66,7 @@ pub fn preprocess( | ... | @@ -66,9 +66,7 @@ pub fn preprocess( |
| 66 | | 66 | |
| 67 | if (hasAnyErrors(comp)) return error.PreprocessError; | 67 | if (hasAnyErrors(comp)) return error.PreprocessError; |
| 68 | | 68 | |
| 69 | pp.prettyPrintTokens(writer, .result_only) catch |err| switch (err) { | 69 | try pp.prettyPrintTokens(writer, .result_only); |
| 70 | error.WriteFailed => return error.OutOfMemory, | | |
| 71 | }; | | |
| 72 | | 70 | |
| 73 | if (maybe_dependencies) |dependencies| { | 71 | if (maybe_dependencies) |dependencies| { |
| 74 | for (comp.sources.values()) |comp_source| { | 72 | for (comp.sources.values()) |comp_source| { |