Function addCSourceFile [src]

Prototype

pub fn addCSourceFile(m: *Module, source: CSourceFile) void

Parameters

m: *Modulesource: CSourceFile

Source

pub fn addCSourceFile(m: *Module, source: CSourceFile) void { const b = m.owner; const allocator = b.allocator; const c_source_file = allocator.create(CSourceFile) catch @panic("OOM"); c_source_file.* = source.dupe(b); m.link_objects.append(allocator, .{ .c_source_file = c_source_file }) catch @panic("OOM"); }