Skip to main content

lookup_or_insert_function

Function lookup_or_insert_function 

Source
pub fn lookup_or_insert_function(
    ctx: &mut Context,
    symbol_table_collection: &mut SymbolTableCollection,
    symbol_table_op: Box<dyn SymbolTableInterface>,
    name: Identifier,
    return_type: Ptr<TypeObj>,
    param_types: Vec<Ptr<TypeObj>>,
    is_var_arg: bool,
) -> Result<FuncOp>
Expand description

Looks up a function by name in the given symbol table. If it exists, checks that its type matches the provided type. If it doesn’t exist, inserts a new function with the given name and type.