[PATCH] [llgo] irgen: expose PackageCreated hook

Peter Collingbourne peter at pcc.me.uk
Tue Jan 13 21:19:11 PST 2015


REPOSITORY
  rL LLVM

http://reviews.llvm.org/D6955

Files:
  llgo/trunk/irgen/compiler.go

Index: llgo/trunk/irgen/compiler.go
===================================================================
--- llgo/trunk/irgen/compiler.go
+++ llgo/trunk/irgen/compiler.go
@@ -93,6 +93,11 @@
 	// compiler will set this field automatically using MakeImporter().
 	// If Importer is non-nil, InitMap must be non-nil also.
 	InitMap map[*types.Package]gccgoimporter.InitData
+
+	// PackageCreated is a hook passed to the go/loader package via
+	// loader.Config, see the documentation for that package for more
+	// information.
+	PackageCreated func(*types.Package)
 }
 
 type Compiler struct {
@@ -202,7 +207,8 @@
 			Import: compiler.Importer,
 			Sizes:  compiler.llvmtypes,
 		},
-		Build: &buildctx.Context,
+		Build:          &buildctx.Context,
+		PackageCreated: compiler.PackageCreated,
 	}
 	// If no import path is specified, then set the import
 	// path to be the same as the package's name.

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D6955.18135.patch
Type: text/x-patch
Size: 900 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150114/10cccfba/attachment.bin>


More information about the llvm-commits mailing list