cl: _testdata/printf
This commit is contained in:
@@ -258,7 +258,7 @@ func (b Builder) UnOp(op token.Token, x Expr) Expr {
|
||||
// Load returns the value at the pointer ptr.
|
||||
func (b Builder) Load(ptr Expr) Expr {
|
||||
if debugInstr {
|
||||
log.Printf("Load @%v\n", ptr.impl.Name())
|
||||
log.Printf("Load %v\n", ptr.impl.Name())
|
||||
}
|
||||
telem := b.prog.Elem(ptr.Type)
|
||||
return Expr{llvm.CreateLoad(b.impl, telem.ll, ptr.impl), telem}
|
||||
@@ -267,7 +267,7 @@ func (b Builder) Load(ptr Expr) Expr {
|
||||
// Store stores val at the pointer ptr.
|
||||
func (b Builder) Store(ptr, val Expr) Builder {
|
||||
if debugInstr {
|
||||
log.Printf("Store @%v, %v\n", ptr.impl.Name(), val.impl)
|
||||
log.Printf("Store %v, %v\n", ptr.impl.Name(), val.impl)
|
||||
}
|
||||
b.impl.CreateStore(val.impl, ptr.impl)
|
||||
return b
|
||||
|
||||
@@ -42,15 +42,15 @@ const (
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
const (
|
||||
nameValist = "__llgo_va_list"
|
||||
NameValist = "__llgo_va_list"
|
||||
)
|
||||
|
||||
func VArg() *types.Var {
|
||||
return types.NewParam(0, nil, nameValist, types.Typ[types.Invalid])
|
||||
return types.NewParam(0, nil, NameValist, types.Typ[types.Invalid])
|
||||
}
|
||||
|
||||
func IsVArg(arg *types.Var) bool {
|
||||
return arg.Name() == nameValist
|
||||
return arg.Name() == NameValist
|
||||
}
|
||||
|
||||
func HasVArg(t *types.Tuple, n int) bool {
|
||||
|
||||
Reference in New Issue
Block a user