2 * This file is part of libFirm.
3 * Copyright (C) 2012 University of Karlsruhe.
8 * @brief Backend module interface.
9 * @author Matthias Braun
12 #ifndef FIRM_BE_BEMODULE_H
13 #define FIRM_BE_BEMODULE_H
16 * Mark a function as module constructor.
17 * Currently you have to add modules manually in the list in bemodule.c.
18 * However future extensions might allow them to be automatically discovered
19 * when they are marked with BE_REGISTER_MODULE_CONSTRUCTOR
21 * Add this before your constructor as it will declare the function
23 #define BE_REGISTER_MODULE_CONSTRUCTOR(func) void func(void);
26 * Mark a function as module destructor.
28 * Add this before your constructor as it will declare the function
30 #define BE_REGISTER_MODULE_DESTRUCTOR(func) void func(void);
33 * Call all module constructors
35 void be_init_modules(void);
38 * Call all module destructors
40 void be_quit_modules(void);
42 //---------------------------------------------------------------------------
46 typedef struct be_module_list_entry_t be_module_list_entry_t;
48 void be_add_module_to_list(be_module_list_entry_t **list_head, const char *name,
51 void be_add_module_list_opt(lc_opt_entry_t *grp, const char *name,
52 const char *description,
53 be_module_list_entry_t * const * first,
56 #endif /* FIRM_BE_BEMODULE_H */