From 6a293dffc754462c870f371b69a823b34198e894 Mon Sep 17 00:00:00 2001 From: John Hodge Date: Sun, 21 Aug 2016 17:40:56 +0800 Subject: MIR Gen - Mark values used in calls as moved --- src/mir/from_hir.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/mir/from_hir.cpp') diff --git a/src/mir/from_hir.cpp b/src/mir/from_hir.cpp index 3a85ebbd..ba8bb7a1 100644 --- a/src/mir/from_hir.cpp +++ b/src/mir/from_hir.cpp @@ -1015,9 +1015,10 @@ namespace { { this->visit_node_ptr(arg); values.push_back( m_builder.lvalue_or_temp( arg->m_res_type, m_builder.get_result(arg->span()) ) ); + m_builder.moved_lvalue( values.back() ); } - // TODO: Obtain function type for this function + // TODO: Obtain function type for this function (i.e. a type that is specifically for this function) auto fcn_ty_data = ::HIR::FunctionType { false, "", @@ -1063,6 +1064,7 @@ namespace { { this->visit_node_ptr(arg); values.push_back( m_builder.lvalue_or_temp( arg->m_res_type, m_builder.get_result(arg->span()) ) ); + m_builder.moved_lvalue( values.back() ); } -- cgit v1.2.3