Exemple #1
0
func (v Target) genPointerGlobal(global *ssa.Global) {
	init := global.Initialiser()

	switch init.(type) {

	default:
		panic("unim")
	}
}
Exemple #2
0
func (v Target) genArrayGlobal(global *ssa.Global) {
	init := global.Initialiser()

	switch init := init.(type) {
	case *ssa.LiteralInitialiser:
		lit := init.Literal()
		if str, ok := lit.(*ssa.StringLiteral); ok {
			v.wop(".ascii \"%s\"", ssa.EscapeString(str.LiteralValue().(string)))
		} else {
			panic("unim")
		}

	default:
		panic("unim")
	}
}