diff --git a/compiler/compiler.go b/compiler/compiler.go index e176523d..bf897537 100644 --- a/compiler/compiler.go +++ b/compiler/compiler.go @@ -728,11 +728,11 @@ func (c *Compiler) getDIType(typ types.Type) (llvm.Metadata, error) { encoding = llvm.DW_ATE_address } // TODO: other types - return c.dibuilder.CreateBasicType(llvm.DIBasicType{ + dityp = c.dibuilder.CreateBasicType(llvm.DIBasicType{ Name: name, SizeInBits: sizeInBytes * 8, Encoding: encoding, - }), nil + }) c.ditypes[name] = dityp return dityp, nil } diff --git a/main.go b/main.go index ec3bbc3d..59ccf23a 100644 --- a/main.go +++ b/main.go @@ -297,7 +297,7 @@ func main() { os.Exit(1) } if *target != llvm.DefaultTargetTriple() { - fmt.Fprintf(os.Stderr, "Cannot run %s: target triple does not match host triple.") + fmt.Fprintf(os.Stderr, "Cannot run %s: target triple does not match host triple.", *target) os.Exit(1) } err := Run(flag.Arg(0))