prog.PointerSize
This commit is contained in:
@@ -165,6 +165,8 @@ type aProgram struct {
|
|||||||
|
|
||||||
paramObjPtr_ *types.Var
|
paramObjPtr_ *types.Var
|
||||||
|
|
||||||
|
ptrSize int
|
||||||
|
|
||||||
NeedRuntime bool
|
NeedRuntime bool
|
||||||
NeedPyInit bool
|
NeedPyInit bool
|
||||||
is32Bits bool
|
is32Bits bool
|
||||||
@@ -194,7 +196,7 @@ func NewProgram(target *Target) Program {
|
|||||||
return &aProgram{
|
return &aProgram{
|
||||||
ctx: ctx, gocvt: newGoTypes(),
|
ctx: ctx, gocvt: newGoTypes(),
|
||||||
target: target, td: td, is32Bits: is32Bits,
|
target: target, td: td, is32Bits: is32Bits,
|
||||||
named: make(map[string]llvm.Type),
|
ptrSize: td.PointerSize(), named: make(map[string]llvm.Type),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -178,7 +178,7 @@ func OffsetOf(prog Program, t Type, i int) Expr {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
func (p Program) PointerSize() int {
|
func (p Program) PointerSize() int {
|
||||||
return p.td.PointerSize()
|
return p.ptrSize
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p Program) Slice(typ Type) Type {
|
func (p Program) Slice(typ Type) Type {
|
||||||
|
|||||||
Reference in New Issue
Block a user