fix bugs found by LLVM assertions

This commit is contained in:
Jaden Weiss
2019-09-15 12:43:33 -04:00
parent d975ed9373
commit fee496ae79
9 changed files with 164 additions and 22 deletions
+1 -1
View File
@@ -2743,7 +2743,7 @@ func (c *Compiler) ExternalInt64AsPtr() error {
// correct calling convention.
fn.SetLinkage(llvm.InternalLinkage)
fn.SetUnnamedAddr(true)
entryBlock := llvm.AddBasicBlock(externalFn, "entry")
entryBlock := c.ctx.AddBasicBlock(externalFn, "entry")
c.builder.SetInsertPointAtEnd(entryBlock)
var callParams []llvm.Value
if fnType.ReturnType() == int64Type {