func (c *Compiler) Compile(fset *token.FileSet, astFiles []*ast.File, importpath string) (m *Module, err error) { target := llvm.NewTargetData(c.dataLayout) compiler := &compiler{ CompilerOptions: c.opts, dataLayout: c.dataLayout, target: target, llvmtypes: NewLLVMTypeMap(llvm.GlobalContext(), target), } return compiler.compile(fset, astFiles, importpath) }
func (c *Compiler) Compile(filenames []string, importpath string) (m *Module, err error) { target := llvm.NewTargetData(c.dataLayout) compiler := &compiler{ CompilerOptions: c.opts, dataLayout: c.dataLayout, target: target, pnacl: c.pnacl, llvmtypes: NewLLVMTypeMap(llvm.GlobalContext(), target), } return compiler.compile(filenames, importpath) }