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:
Joe Groff
2013-12-10 03:36:59 +00:00
parent 2d61bd31f8
commit 02a0e996c4
25 changed files with 50 additions and 150 deletions

View File

@@ -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