removing inlining restrictions
Signed-off-by: Jakub Doka <jakub.doka2@gmail.com>
This commit is contained in:
parent
c8bdcd148c
commit
3c5f5dea95
|
@ -2846,16 +2846,6 @@ impl<'a> Codegen<'a> {
|
|||
|
||||
let InlineRet { ret_val_ref: _ig, ret_val, ctrl, mut scope } =
|
||||
mem::replace(&mut self.ci.inline_ret, prev_inline_ret)?;
|
||||
if is_inline
|
||||
&& ctrl.get() != prev_ctrl
|
||||
&& (!self.ci.nodes[ctrl.get()].kind.is_call()
|
||||
|| self.ci.nodes[ctrl.get()].inputs[0] != prev_ctrl)
|
||||
{
|
||||
self.error(
|
||||
body.pos(),
|
||||
"function is makred inline but it contains controlflow or more then one call",
|
||||
);
|
||||
}
|
||||
|
||||
// this is here because we report error in the inline function file
|
||||
self.ci.file = prev_file;
|
||||
|
|
Loading…
Reference in a new issue