github.com/jujuyuki/gospal@v1.0.1-0.20210215170718-af79fae13b20/ssa/ssa.go (about)

     1  // Package ssa is a library to build and work with SSA.
     2  // For most part the package contains helper or wrapper functions to use the
     3  // packages in Go project's extra tools.
     4  //
     5  // In particular, the SSA IR is from golang.org/x/tools/go/ssa, and reuses many
     6  // of the packages in the static analysis stack built on top of it.
     7  //
     8  package ssa
     9  
    10  import (
    11  	"go/token"
    12  	"io"
    13  	"log"
    14  
    15  	"golang.org/x/tools/go/loader"
    16  	"golang.org/x/tools/go/ssa"
    17  )
    18  
    19  // Info holds the results of a SSA build for analysis.
    20  // To populate this structure, the 'build' subpackage should be used.
    21  //
    22  type Info struct {
    23  	IgnoredPkgs []string // Record of ignored package during the build process.
    24  
    25  	FSet  *token.FileSet  // FileSet for parsed source files.
    26  	Prog  *ssa.Program    // SSA IR for whole program.
    27  	LProg *loader.Program // Loaded program from go/loader.
    28  
    29  	BldLog io.Writer // Build log.
    30  	PtaLog io.Writer // Pointer analysis log.
    31  
    32  	Logger *log.Logger // Build logger.
    33  }