github.com/april1989/origin-go-tools@v0.0.32/cmd/godex/gccgo.go (about) 1 // Copyright 2014 The Go Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 // This file implements access to gccgo-generated export data. 6 7 package main 8 9 import ( 10 "go/importer" 11 "go/token" 12 "go/types" 13 ) 14 15 func init() { 16 register("gccgo", importer.ForCompiler(token.NewFileSet(), "gccgo", nil)) 17 } 18 19 // Print the extra gccgo compiler data for this package, if it exists. 20 func (p *printer) printGccgoExtra(pkg *types.Package) { 21 // Disabled for now. 22 // TODO(gri) address this at some point. 23 24 // if initdata, ok := initmap[pkg]; ok { 25 // p.printf("/*\npriority %d\n", initdata.Priority) 26 27 // p.printDecl("init", len(initdata.Inits), func() { 28 // for _, init := range initdata.Inits { 29 // p.printf("%s %s %d\n", init.Name, init.InitFunc, init.Priority) 30 // } 31 // }) 32 33 // p.print("*/\n") 34 // } 35 }