mozilla/rust — pull request #9699 by thestinger (2013-10-03 08:03:33+00:00)
Title: make unit structs immediate

struct Foo;
fn foo() -> Foo { Foo }

Before:

; Function Attrs: nounwind readnone uwtable
define void @_ZN3foo18he8ca29755dedebbaf4v0.0E(%struct.Foo* noalias nocapture sret, { i64, %tydesc*, i8*, i8*, i8 }* nocapture) #0 {
"function top level":
ret void
}

After:

; Function Attrs: nounwind readnone uwtable
define %struct.Foo @_ZN3foo18he8ca29755dedebbaf4v0.0E({ i64, %tydesc*, i8*, i8*, i8 }* nocapture readnone) #0 {
"function top level":
ret %struct.Foo undef
}