global var init

This commit is contained in:
xushiwei
2024-04-21 00:22:39 +08:00
parent 358e18b9de
commit 8f31e4a6d3
7 changed files with 22 additions and 11 deletions

View File

@@ -43,6 +43,10 @@ func llvmValues(vals []Expr) []llvm.Value {
// -----------------------------------------------------------------------------
func (p Program) Null(t Type) Expr {
return Expr{llvm.ConstNull(t.ll), t}
}
func (p Program) BoolVal(v bool) Expr {
t := p.Bool()
var bv uint64