blob: a539f9814c20a24154e0e2a860c5768e3bce33f8 [file] [log] [blame]
Robert Griesemer4a27ee32014-03-25 15:26:38 -07001// 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
7package main
8
9import (
Robert Griesemeradaaa072016-03-17 12:25:34 -070010 "go/importer"
Rebecca Stambler207d3de2019-11-20 22:43:00 -050011 "go/token"
Robert Griesemeradaaa072016-03-17 12:25:34 -070012 "go/types"
Peter Collingbourne02990bd2014-06-17 10:56:47 -070013)
14
Robert Griesemer4a27ee32014-03-25 15:26:38 -070015func init() {
Rebecca Stambler207d3de2019-11-20 22:43:00 -050016 register("gccgo", importer.ForCompiler(token.NewFileSet(), "gccgo", nil))
Robert Griesemer4a27ee32014-03-25 15:26:38 -070017}
18
Peter Collingbourne02990bd2014-06-17 10:56:47 -070019// Print the extra gccgo compiler data for this package, if it exists.
20func (p *printer) printGccgoExtra(pkg *types.Package) {
Robert Griesemeradaaa072016-03-17 12:25:34 -070021 // Disabled for now.
22 // TODO(gri) address this at some point.
Robert Griesemer4a27ee32014-03-25 15:26:38 -070023
Robert Griesemeradaaa072016-03-17 12:25:34 -070024 // if initdata, ok := initmap[pkg]; ok {
25 // p.printf("/*\npriority %d\n", initdata.Priority)
Peter Collingbourne02990bd2014-06-17 10:56:47 -070026
Robert Griesemeradaaa072016-03-17 12:25:34 -070027 // 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 // }
Robert Griesemer4a27ee32014-03-25 15:26:38 -070035}