diff options
author | John Hodge <tpg@mutabah.net> | 2017-01-11 21:37:00 +0800 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2017-01-11 21:37:00 +0800 |
commit | d8e1c31c2158f60ce19a09723904ab0b71f7c27a (patch) | |
tree | d17b4fc061bbb0fd7ec8b8f3efca10139c6f51c6 /src/hir/serialise.cpp | |
parent | 04b6360ff879a70a42fcd5f09cccc23cc2dd2d9f (diff) | |
download | mrust-d8e1c31c2158f60ce19a09723904ab0b71f7c27a.tar.gz |
All - Enable library codegen (and use crate name everywhere)
Diffstat (limited to 'src/hir/serialise.cpp')
-rw-r--r-- | src/hir/serialise.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/hir/serialise.cpp b/src/hir/serialise.cpp index 4feece50..0f444583 100644 --- a/src/hir/serialise.cpp +++ b/src/hir/serialise.cpp @@ -441,10 +441,10 @@ namespace { ) } - void serialise(const ::HIR::ExprPtr& exp) + void serialise(const ::HIR::ExprPtr& exp, bool save_mir=true) { - m_out.write_bool( (bool)exp.m_mir ); - if( exp.m_mir ) { + m_out.write_bool( (bool)exp.m_mir && save_mir ); + if( exp.m_mir && save_mir ) { serialise(*exp.m_mir); } serialise_vec( exp.m_erased_types ); @@ -763,7 +763,7 @@ namespace { serialise(fcn.m_return); DEBUG("m_args = " << fcn.m_args); - serialise(fcn.m_code); + serialise(fcn.m_code, fcn.m_save_code); } void serialise(const ::HIR::Constant& item) { |