diff options
| author | Peter Collingbourne <peter@pcc.me.uk> | 2014-12-31 00:25:35 +0000 |
|---|---|---|
| committer | Peter Collingbourne <peter@pcc.me.uk> | 2014-12-31 00:25:35 +0000 |
| commit | 76c1d4e4ddbb541d63de5559baaee34fadd37500 (patch) | |
| tree | 97ddd3f5fbf7636f50f97e92f5b1ea446441fe01 /llgo | |
| parent | 82a260eaaf36a51e962303ae637fe4aca67b52dd (diff) | |
| download | bcm5719-llvm-76c1d4e4ddbb541d63de5559baaee34fadd37500.tar.gz bcm5719-llvm-76c1d4e4ddbb541d63de5559baaee34fadd37500.zip | |
irgen: return a types.Package to the compiler client
Differential Revision: http://reviews.llvm.org/D6802
llvm-svn: 225028
Diffstat (limited to 'llgo')
| -rw-r--r-- | llgo/irgen/compiler.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llgo/irgen/compiler.go b/llgo/irgen/compiler.go index de496fffe7c..c7768e26d87 100644 --- a/llgo/irgen/compiler.go +++ b/llgo/irgen/compiler.go @@ -38,6 +38,7 @@ type Module struct { llvm.Module Path string ExportData []byte + Package *types.Package disposed bool } @@ -194,7 +195,7 @@ func (compiler *compiler) compile(fset *token.FileSet, astFiles []*ast.File, imp // Create a Module, which contains the LLVM module. modulename := importpath - compiler.module = &Module{Module: llvm.NewModule(modulename), Path: modulename} + compiler.module = &Module{Module: llvm.NewModule(modulename), Path: modulename, Package: mainPkg.Object} compiler.module.SetTarget(compiler.TargetTriple) compiler.module.SetDataLayout(compiler.dataLayout) |

