forked from AbleOS/holey-bytes
lifting the restriction for inlining to allow normal functions as well
Signed-off-by: Jakub Doka <jakub.doka2@gmail.com>
This commit is contained in:
parent
3702a99d03
commit
47014c6164
|
@ -2575,7 +2575,7 @@ impl<'a> Codegen<'a> {
|
||||||
mem::replace(&mut self.ci.inline_ret, prev_inline_ret)?;
|
mem::replace(&mut self.ci.inline_ret, prev_inline_ret)?;
|
||||||
if is_inline
|
if is_inline
|
||||||
&& ctrl.get() != prev_ctrl
|
&& ctrl.get() != prev_ctrl
|
||||||
&& (!self.ci.nodes[ctrl.get()].kind.is_eca()
|
&& (!self.ci.nodes[ctrl.get()].kind.is_call()
|
||||||
|| self.ci.nodes[ctrl.get()].inputs[0] != prev_ctrl)
|
|| self.ci.nodes[ctrl.get()].inputs[0] != prev_ctrl)
|
||||||
{
|
{
|
||||||
self.error(body.pos(), "function is makred inline but it contains controlflow");
|
self.error(body.pos(), "function is makred inline but it contains controlflow");
|
||||||
|
|
Loading…
Reference in a new issue