| ... | @@ -14,8 +14,6 @@ pub fn preprocess( | ... | @@ -14,8 +14,6 @@ pub fn preprocess( |
| 14 | argv: []const []const u8, | 14 | argv: []const []const u8, |
| 15 | maybe_dependencies: ?*Dependencies, | 15 | maybe_dependencies: ?*Dependencies, |
| 16 | ) PreprocessError!void { | 16 | ) PreprocessError!void { |
| 17 | try comp.addDefaultPragmaHandlers(); | | |
| 18 | | | |
| 19 | var driver: aro.Driver = .{ .comp = comp, .diagnostics = comp.diagnostics, .aro_name = "arocc" }; | 17 | var driver: aro.Driver = .{ .comp = comp, .diagnostics = comp.diagnostics, .aro_name = "arocc" }; |
| 20 | defer driver.deinit(); | 18 | defer driver.deinit(); |
| 21 | | 19 | |
| ... | @@ -47,7 +45,7 @@ pub fn preprocess( | ... | @@ -47,7 +45,7 @@ pub fn preprocess( |
| 47 | if (hasAnyErrors(comp)) return error.GeneratedSourceError; | 45 | if (hasAnyErrors(comp)) return error.GeneratedSourceError; |
| 48 | | 46 | |
| 49 | comp.generated_buf.items.len = 0; | 47 | comp.generated_buf.items.len = 0; |
| 50 | var pp = aro.Preprocessor.initDefault(comp) catch |err| switch (err) { | 48 | var pp = aro.Preprocessor.init(comp, .{ .base_file = source.id }) catch |err| switch (err) { |
| 51 | error.FatalError => return error.GeneratedSourceError, | 49 | error.FatalError => return error.GeneratedSourceError, |
| 52 | error.OutOfMemory => |e| return e, | 50 | error.OutOfMemory => |e| return e, |
| 53 | }; | 51 | }; |