removing inlining restrictions

Signed-off-by: Jakub Doka <jakub.doka2@gmail.com>
This commit is contained in:
Jakub Doka 2025-02-02 23:16:24 +01:00
parent c8bdcd148c
commit 3c5f5dea95
No known key found for this signature in database
GPG key ID: C6E9A89936B8C143

View file

@ -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;