main: compile C source files in packages

TODO: C++ etc. files
This commit is contained in:
Ayke van Laethem
2018-11-25 18:05:29 +01:00
parent e10d05c74f
commit dea660b21c
3 changed files with 28 additions and 5 deletions
+4
View File
@@ -149,6 +149,10 @@ func NewCompiler(pkgName string, config Config) (*Compiler, error) {
return c, nil
}
func (c *Compiler) Packages() []*loader.Package {
return c.ir.LoaderProgram.Sorted()
}
// Return the LLVM module. Only valid after a successful compile.
func (c *Compiler) Module() llvm.Module {
return c.mod