Avatar
norio_nomura 7/12/2017 7:39 AM
呼び出し側 alloc_global @main.foo : Swift.Int, loc "<stdin>":9:5, scope 1 // id: %2 %3 = global_addr @main.foo : Swift.Int : $*Int, loc "<stdin>":9:5, scope 1 // user: %11 … %11 = apply %4<Int>(%3, %10, %6) : $@convention(method) <τ_0_0 where τ_0_0 : Factory> (@owned @callee_owned () -> @out τ_0_0, @thick τ_0_0.Type) -> @out τ_0_0, loc "<stdin>":11:1, scope 1
7:41 AM
Creates a reference to the address of a global variable which has been previously initialized by alloc_global. It is undefined behavior to perform this operation on a global variable which has not been initialized.