diff options
author | John Hodge <tpg@mutabah.net> | 2016-12-28 16:24:20 +1100 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2016-12-28 16:24:20 +1100 |
commit | 5c64edfd50b334022f0a0ca5414287a9dd8aa3c2 (patch) | |
tree | 711b9841ce04b3b76559c54b598c299818384f0e /src/mir/from_hir.cpp | |
parent | f057e423c91a7ab821b68e7ec04f3280c24a1ffc (diff) | |
download | mrust-5c64edfd50b334022f0a0ca5414287a9dd8aa3c2.tar.gz |
MIR Gen - Handle diverging calls fully
Diffstat (limited to 'src/mir/from_hir.cpp')
-rw-r--r-- | src/mir/from_hir.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mir/from_hir.cpp b/src/mir/from_hir.cpp index 3e41feeb..b5e42d31 100644 --- a/src/mir/from_hir.cpp +++ b/src/mir/from_hir.cpp @@ -1503,6 +1503,12 @@ namespace { unconditional_diverge = true; } } + else + { + // TODO: Know if the call unconditionally diverges. + if( node.m_cache.m_arg_types.back().m_data.is_Diverge() ) + unconditional_diverge = true; + } // If the call wasn't to an intrinsic, emit it as a path if( m_builder.block_active() ) |