diff options
| author | bors <bors@rust-lang.org> | 2013-10-02 07:56:36 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2013-10-02 07:56:36 -0700 |
| commit | c44826fdcd036982b955407677c5ec4ce1f834ce (patch) | |
| tree | b5a277bed46512e925d35213396ba2f6a9e7d184 /src/rt/sync/rust_thread.cpp | |
| parent | 17548378a707fae752dc722e2fb767a65195e422 (diff) | |
| parent | f2932e46614ab0f91f7dfd064cadf1e3db2a9667 (diff) | |
| download | rust-c44826fdcd036982b955407677c5ec4ce1f834ce.tar.gz rust-c44826fdcd036982b955407677c5ec4ce1f834ce.zip | |
auto merge of #9677 : thestinger/rust/immediate, r=huonw
C-like enums are excluded from this for now, because the code paths
specific to them need to be changed.
fn foo() -> Option<~int> { Some(~5) }
Before:
; Function Attrs: uwtable
define void @_ZN3foo18hdec6e36682b87eeaf4v0.0E(%"enum.std::option::Option<~int>[#1]"* noalias nocapture sret, { i64, %tydesc*, i8*, i8*, i8 }* nocapture readnone) #0 {
"function top level":
%2 = tail call %"enum.std::libc::types::common::c95::c_void[#1]"* @"_ZN2rt11global_heap10malloc_raw17h56c543b77f9b78aY11v0.9$x2dpreE"({ i64, %tydesc*, i8*, i8*, i8 }* undef, i64 8)
%3 = bitcast %"enum.std::libc::types::common::c95::c_void[#1]"* %2 to i64*
store i64 5, i64* %3, align 8
%4 = getelementptr inbounds %"enum.std::option::Option<~int>[#1]"* %0, i64 0, i32 0
store i64* %3, i64** %4, align 8
ret void
}
After:
; Function Attrs: uwtable
define %"enum.std::option::Option<~int>[#1]" @_ZN3foo18h2cbf6557a3143edah4v0.0E({ i64, %tydesc*, i8*, i8*, i8 }* nocapture readnone) #0 {
"function top level":
%1 = tail call %"enum.std::libc::types::common::c95::c_void[#1]"* @"_ZN2rt11global_heap10malloc_raw18hb1e9dd1beab35edau11v0.9$x2dpreE"({ i64, %tydesc*, i8*, i8*, i8 }* undef, i64 8)
%2 = bitcast %"enum.std::libc::types::common::c95::c_void[#1]"* %1 to i64*
store i64 5, i64* %2, align 8
%oldret = insertvalue %"enum.std::option::Option<~int>[#1]" undef, i64* %2, 0
ret %"enum.std::option::Option<~int>[#1]" %oldret
}
Diffstat (limited to 'src/rt/sync/rust_thread.cpp')
0 files changed, 0 insertions, 0 deletions
