compiler: rename .Parse() to .Compiler()

The fact it was called Parse() is more of a historical accident, as the
compiler started out using the Go AST directly instead of Go SSA.
This commit is contained in:
Ayke van Laethem
2018-09-24 15:54:39 +02:00
parent 1b229a8f8b
commit 6191d4e1ac
2 changed files with 7 additions and 4 deletions
+4 -1
View File
@@ -141,11 +141,14 @@ func NewCompiler(pkgName string, config Config) (*Compiler, error) {
return c, nil
}
// Return the LLVM module. Only valid after a successful compile.
func (c *Compiler) Module() llvm.Module {
return c.mod
}
func (c *Compiler) Parse(mainPath string) error {
// Compile the given package path or .go file path. Return an error when this
// fails (in any stage).
func (c *Compiler) Compile(mainPath string) error {
tripleSplit := strings.Split(c.Triple, "-")
config := loader.Config{