From b7a614eaa116524c062c3f8e78836803aacdb7d7 Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Tue, 4 Dec 2012 23:15:44 +0100 Subject: [PATCH] improve docu, fix doxygen warnings --- Doxyfile | 4 ++-- include/libfirm/adt/plist.h | 8 ++++++++ include/libfirm/adt/pmap.h | 2 +- include/libfirm/adt/pset.h | 4 ++-- include/libfirm/adt/set.h | 4 ++-- include/libfirm/firm_common.h | 13 +++++++++++-- include/libfirm/irarch.h | 19 +++++++++++++------ include/libfirm/irloop.h | 2 +- include/libfirm/typerep.h | 2 +- 9 files changed, 41 insertions(+), 17 deletions(-) diff --git a/Doxyfile b/Doxyfile index bb7e9bf18..085c7d253 100644 --- a/Doxyfile +++ b/Doxyfile @@ -355,7 +355,7 @@ LOOKUP_CACHE_SIZE = 0 # Private class members and static file members will be hidden unless # the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES -EXTRACT_ALL = no +EXTRACT_ALL = YES # If the EXTRACT_PRIVATE tag is set to YES all private members of a class # will be included in the documentation. @@ -487,7 +487,7 @@ SORT_MEMBERS_CTORS_1ST = NO # hierarchy of group names into alphabetical order. If set to NO (the default) # the group names will appear in their defined order. -SORT_GROUP_NAMES = NO +SORT_GROUP_NAMES = YES # If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be # sorted by fully-qualified names, including namespaces. If set to diff --git a/include/libfirm/adt/plist.h b/include/libfirm/adt/plist.h index 2f0c0dc8c..8571a9224 100644 --- a/include/libfirm/adt/plist.h +++ b/include/libfirm/adt/plist.h @@ -36,6 +36,12 @@ #include "../begin.h" +/** + * @ingroup adt + * @defgroup plist pointer lists (deprecated) + * @{ + */ + typedef struct plist_element plist_element_t; typedef struct plist plist_t; @@ -234,6 +240,8 @@ FIRM_API void plist_clear(plist_t *list); #define foreach_plist(list, el) \ for (el = plist_first(list); el; el = plist_element_get_next(el)) +/** @} */ + #include "../end.h" #endif diff --git a/include/libfirm/adt/pmap.h b/include/libfirm/adt/pmap.h index 3bb507e16..250a1de58 100644 --- a/include/libfirm/adt/pmap.h +++ b/include/libfirm/adt/pmap.h @@ -75,7 +75,7 @@ FIRM_API void * pmap_get(pmap *map, const void * key); /** * Returns the value of "key". - * This is a wrapper for pmap_get(pmap *map); It allows to express the + * This is a wrapper for pmap_get(map, key); It allows to express the * intended type of the set elements (instead of weakly typed void*). */ #define pmap_get(type, map, key) ((type*)pmap_get(map, key)) diff --git a/include/libfirm/adt/pset.h b/include/libfirm/adt/pset.h index 11d740ca1..5b875e4cf 100644 --- a/include/libfirm/adt/pset.h +++ b/include/libfirm/adt/pset.h @@ -191,7 +191,7 @@ FIRM_API void *pset_first(pset *pset); /** * Returns the first element of a pset. - * This is a wrapper for pset_first(pmap *map); It allows to express the + * This is a wrapper for pset_first(set); It allows to express the * intended type of the set elements (instead of weakly typed void*). * * @param type destination type of the pointers in the set @@ -213,7 +213,7 @@ FIRM_API void *pset_next(pset *pset); /** * Returns the next element of a pset. - * This is a wrapper for pset_next(pmap *map); It allows to express the + * This is a wrapper for pset_next(set); It allows to express the * intended type of the set elements (instead of weakly typed void*). * * @param type destination type of the pointers in the set diff --git a/include/libfirm/adt/set.h b/include/libfirm/adt/set.h index f2235bdb2..15f782bb9 100644 --- a/include/libfirm/adt/set.h +++ b/include/libfirm/adt/set.h @@ -173,7 +173,7 @@ FIRM_API void *set_first(set *set); /** * Returns the first element of a set. - * This is a wrapper for set_first(set *set); It allows to express the + * This is a wrapper for set_first(set); It allows to express the * intended type of the set elements (instead of weakly typed void*). * * @param set the set to iterate @@ -195,7 +195,7 @@ FIRM_API void *set_next(set *set); /** * Returns the next element of a set. - * This is a wrapper for set_next(set *set); It allows to express the + * This is a wrapper for set_next(set); It allows to express the * intended type of the set elements (instead of weakly typed void*). * * @param set the set to iterate diff --git a/include/libfirm/firm_common.h b/include/libfirm/firm_common.h index 52645b342..2c8633aba 100644 --- a/include/libfirm/firm_common.h +++ b/include/libfirm/firm_common.h @@ -28,6 +28,13 @@ #include "firm_types.h" #include "begin.h" +/** + * @defgroup initalization Library Initialization + * The functions in this section deal with initialization and deinitalization + * of the libFirm library. + * @{ + */ + /** * Initializes the firm library. Allocates default data structures. */ @@ -48,13 +55,13 @@ FIRM_API const char *ir_get_version_revision(void); FIRM_API const char *ir_get_version_build(void); /** - * a list of firm kinds + * A list of firm kinds. * Most important datastructures in firm contain a firm_kind field at the * beginning so given void* pointer you can usually still guess the kind * of thing the pointer points to. * This is used in debug helper functions and printers. */ -typedef enum { +typedef enum firm_kind { k_BAD = 0, /**< An invalid firm node. */ k_entity, /**< An entity. */ k_type, /**< A type. */ @@ -79,6 +86,8 @@ typedef enum { */ FIRM_API firm_kind get_kind(const void *firm_thing); +/** @} */ + #include "end.h" #endif diff --git a/include/libfirm/irarch.h b/include/libfirm/irarch.h index c84710617..1f2d1b1d4 100644 --- a/include/libfirm/irarch.h +++ b/include/libfirm/irarch.h @@ -29,10 +29,15 @@ #include "firm_types.h" #include "begin.h" +/** + * @addtogroup iroptimize + * @{ + */ + /** * The Multiplication replacement can consist of the following instructions. */ -typedef enum instr { +typedef enum insn_kind { LEA, /**< the LEA instruction */ SHIFT, /**< the SHIFT instruction */ SUB, /**< the SUB instruction */ @@ -82,17 +87,17 @@ typedef const ir_settings_arch_dep_t *(*arch_dep_params_factory_t)(void); /** * Optimization flags. */ -typedef enum { +typedef enum arch_dep_opts_t { arch_dep_none = 0, - arch_dep_mul_to_shift = 1, /**< optimize Mul into Shift/Add/Sub */ - arch_dep_div_by_const = 2, /**< optimize Div into Shift/Add/Mulh */ - arch_dep_mod_by_const = 4 /**< optimize Mod into Shift/Add/Mulh */ + arch_dep_mul_to_shift = 1u << 0, /**< optimize Mul into Shift/Add/Sub */ + arch_dep_div_by_const = 1u << 1, /**< optimize Div into Shift/Add/Mulh */ + arch_dep_mod_by_const = 1u << 2 /**< optimize Mod into Shift/Add/Mulh */ } arch_dep_opts_t; ENUM_BITSET(arch_dep_opts_t) /** * Sets the optimizations that shall be applied. - * @param opts An optimization bit mask. + * @param opts An optimization bit mask. */ FIRM_API void arch_dep_set_opts(arch_dep_opts_t opts); @@ -139,6 +144,8 @@ FIRM_API ir_node *arch_dep_replace_div_by_const(ir_node *irn); */ FIRM_API ir_node *arch_dep_replace_mod_by_const(ir_node *irn); +/** @} */ + #include "end.h" #endif diff --git a/include/libfirm/irloop.h b/include/libfirm/irloop.h index 78fc0e711..2e86f4fcd 100644 --- a/include/libfirm/irloop.h +++ b/include/libfirm/irloop.h @@ -61,7 +61,7 @@ typedef union { } loop_element; /** Tests whether a given pointer points to a loop. - * @note only works reliably if @p thing points to something with a #firm_kind + * @note only works reliably if @p thing points to something with a ::firm_kind * header */ FIRM_API int is_ir_loop(const void *thing); diff --git a/include/libfirm/typerep.h b/include/libfirm/typerep.h index c897d7fe0..786b27124 100644 --- a/include/libfirm/typerep.h +++ b/include/libfirm/typerep.h @@ -786,7 +786,7 @@ ENUM_BITSET(ptr_access_kind) * An enum for the type kinds. * For each type kind exists a typecode to identify it. */ -typedef enum { +typedef enum tp_opcode { tpo_uninitialized = 0, /* not a type opcode */ tpo_class, /**< A class type. */ tpo_struct, /**< A struct type. */ -- 2.20.1