mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
SIL: Kill initialize_var instruction.
Remove the initialize_var instruction now that DI fully diagnoses initialization problems. Change String-to-NSString bridging to explicitly invoke String's default constructor; it was the last remaining user of initialize_var. Remove dead code to emit an implicit default constructor without a body. Swift SVN r11066
This commit is contained in:
@@ -309,8 +309,6 @@ struct Val {
|
||||
sil @_TV4todo3ValCfMS0_FT_S0_ : $@thin (Val.metatype) -> Val {
|
||||
bb0(%0 : $Val.metatype):
|
||||
%1 = alloc_stack $Val // CHECK: alloc_stack
|
||||
// CHECK: initialize_var [no_default_construct] {{%.*}} : $*Val
|
||||
%2 = initialize_var [no_default_construct] %1#1 : $*Val
|
||||
%3 = load %1#1 : $*Val
|
||||
dealloc_stack %1#0 : $*@local_storage Val
|
||||
%4 = return %3 : $Val
|
||||
@@ -336,8 +334,6 @@ sil @_TV6struct5AlephCfMS0_FT_S0_ : $@thin (Aleph.metatype) -> Aleph {
|
||||
bb0(%0 : $Aleph.metatype):
|
||||
%1 = tuple ()
|
||||
%2 = alloc_box $Aleph // CHECK: alloc_box
|
||||
// CHECK: initialize_var [no_default_construct]
|
||||
%3 = initialize_var [no_default_construct] %2#1 : $*Aleph
|
||||
// CHECK: struct_element_addr {{.*}} : $*Aleph, #a
|
||||
%5 = struct_element_addr %2#1 : $*Aleph, #a
|
||||
%6 = load %5 : $*Ref
|
||||
|
||||
Reference in New Issue
Block a user