[PATCH] [llgo] irgen: make it possible to use a custom importer

Andrew Wilkins axwalk at gmail.com
Mon Dec 29 16:34:09 PST 2014


LGTM, with a couple of minor suggestions.


================
Comment at: irgen/compiler.go:89
@@ +88,3 @@
+
+	// InitMap is the init map used by Importer. If nil, the compiler will
+	// set this field automatically using MakeImporter().
----------------
If *Importer* is nil, the compiler will set this field automatically using MakeImporter(). If Importer is non-nil, InitMap must be non-nil also (I think?)

================
Comment at: irgen/compiler.go:161
@@ -153,1 +160,3 @@
 
+func (opts *CompilerOptions) MakeImporter() error {
+	opts.InitMap = make(map[*types.Package]gccgoimporter.InitData)
----------------
A brief comment may be useful here, describing the interaction with GccgoPath.

http://reviews.llvm.org/D6803

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list