diff options
| author | Peter Collingbourne <peter@pcc.me.uk> | 2015-01-14 05:18:16 +0000 |
|---|---|---|
| committer | Peter Collingbourne <peter@pcc.me.uk> | 2015-01-14 05:18:16 +0000 |
| commit | 5ab806129318bf0cc6f9a431c988bca29af3c198 (patch) | |
| tree | f3f32d9a9d893a38823480e708dff88df0605495 /llgo | |
| parent | c253ebc4af2042e2655987635349eb8047fe54c8 (diff) | |
| download | bcm5719-llvm-5ab806129318bf0cc6f9a431c988bca29af3c198.tar.gz bcm5719-llvm-5ab806129318bf0cc6f9a431c988bca29af3c198.zip | |
irgen: expose DisableUnusedImportCheck flag
Differential Revision: http://reviews.llvm.org/D6956
llvm-svn: 225946
Diffstat (limited to 'llgo')
| -rw-r--r-- | llgo/irgen/compiler.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/llgo/irgen/compiler.go b/llgo/irgen/compiler.go index 413f31f23f1..36d35b78ce2 100644 --- a/llgo/irgen/compiler.go +++ b/llgo/irgen/compiler.go @@ -98,6 +98,10 @@ type CompilerOptions struct { // loader.Config, see the documentation for that package for more // information. PackageCreated func(*types.Package) + + // DisableUnusedImportCheck disables the unused import check performed + // by go/types if set to true. + DisableUnusedImportCheck bool } type Compiler struct { @@ -206,6 +210,7 @@ func (compiler *compiler) compile(fset *token.FileSet, astFiles []*ast.File, imp TypeChecker: types.Config{ Import: compiler.Importer, Sizes: compiler.llvmtypes, + DisableUnusedImportCheck: compiler.DisableUnusedImportCheck, }, Build: &buildctx.Context, PackageCreated: compiler.PackageCreated, |

