diff options
author | John Hodge <tpg@mutabah.net> | 2016-12-07 18:03:36 +0800 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2016-12-07 18:03:36 +0800 |
commit | 058a5dab9d2a61514265bd6718ec83f8d3721de6 (patch) | |
tree | 89bf24e52682627facffd5eefb99377ea6a3786b /src/hir_conv/constant_evaluation.cpp | |
parent | 7fc04390dee98081027e7ffc7510b100b929fdd0 (diff) | |
download | mrust-058a5dab9d2a61514265bd6718ec83f8d3721de6.tar.gz |
MIR - Merge two call types into one with a different target
Diffstat (limited to 'src/hir_conv/constant_evaluation.cpp')
-rw-r--r-- | src/hir_conv/constant_evaluation.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/hir_conv/constant_evaluation.cpp b/src/hir_conv/constant_evaluation.cpp index c5aab190..54d2bb1b 100644 --- a/src/hir_conv/constant_evaluation.cpp +++ b/src/hir_conv/constant_evaluation.cpp @@ -1166,9 +1166,12 @@ namespace { (Return, return retval; ), - (CallPath, + (Call, + if( !e.fcn.is_Path() ) + BUG(sp, "Unexpected terminator - " << block.terminator); + const auto& fcnp = e.fcn.as_Path(); + auto& dst = get_lval(e.ret_val); - const auto& fcnp = e.fcn_path; auto& fcn = get_function(sp, crate, fcnp); ::std::vector< ::HIR::Literal> call_args; |