diff options
author | John Hodge <tpg@mutabah.net> | 2018-08-04 15:35:46 +0800 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2018-08-04 15:36:26 +0800 |
commit | cd56b774f425b0c842556c3ddeeba708b0fe309f (patch) | |
tree | 2000d80c60c67e4f2d4f0d1906a8e0793e478ec5 /src/mir/from_hir.cpp | |
parent | 5ad533aca561e3daaaf5c7e492ccc5b6a3c99d1b (diff) | |
download | mrust-cd56b774f425b0c842556c3ddeeba708b0fe309f.tar.gz |
Trans - Add auto-generated Clone impls (only for Copy types currently)
Diffstat (limited to 'src/mir/from_hir.cpp')
-rw-r--r-- | src/mir/from_hir.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mir/from_hir.cpp b/src/mir/from_hir.cpp index dc3b78a7..84d60082 100644 --- a/src/mir/from_hir.cpp +++ b/src/mir/from_hir.cpp @@ -1805,6 +1805,14 @@ namespace { mv$(values) })); } + if( fcn.m_abi == "platform-intrinsic" ) + { + m_builder.end_block(::MIR::Terminator::make_Call({ + next_block, panic_block, + res.clone(), ::MIR::CallTarget::make_Intrinsic({ "platform:"+gpath.m_path.m_components.back(), gpath.m_params.clone() }), + mv$(values) + })); + } // rustc has drop_in_place as a lang item, mrustc uses an intrinsic if( gpath.m_path == m_builder.crate().get_lang_item_path_opt("drop_in_place") ) |