Ayke van Laethem
6 years ago
No known key found for this signature in database
GPG Key ID: E97FF5335DFDFDED
2 changed files with
10 additions and
1 deletions
-
compiler.go
-
src/runtime/print.go
|
|
@ -1008,7 +1008,8 @@ func (c *Compiler) parseBuiltin(frame *Frame, args []ssa.Value, callName string) |
|
|
|
panic("undefined: " + name) |
|
|
|
} |
|
|
|
c.builder.CreateCall(fn, []llvm.Value{value}, "") |
|
|
|
continue |
|
|
|
} else if typ.Kind() == types.Bool { |
|
|
|
c.builder.CreateCall(c.mod.NamedFunction("runtime.printbool"), []llvm.Value{value}, "") |
|
|
|
} else { |
|
|
|
return llvm.Value{}, errors.New("unknown basic arg type: " + typ.String()) |
|
|
|
} |
|
|
|
|
|
@ -101,3 +101,11 @@ func printptr(ptr uintptr) { |
|
|
|
ptr <<= 4 |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
func printbool(b bool) { |
|
|
|
if b { |
|
|
|
printstring("true") |
|
|
|
} else { |
|
|
|
printstring("false") |
|
|
|
} |
|
|
|
} |
|
|
|