#ifndef _FORMAT_MANGLING_ITANIUM_ABI2_H
#define _FORMAT_MANGLING_ITANIUM_ABI2_H


#include "component.h"



/* Composant extrait de l'encodage */
struct _itanium_component
{
    ItaniumComponentType type;              /* Type de composant           */

    GItaniumDContext *context;              /* Regroupement de composants  */
    unsigned int refcount;                  /* Compteur de références      */

    fnv64_t hash;                           /* Empreinte en cache          */

    union
    {
        /* ICT_NAME */
        struct
        {
            const char *str;
            size_t len;

        } s_name;

        /* ICT_OPERATOR_NAME */
        struct
        {
            ItaniumOperatorType otype;      /* Sélection dans l'union      */

            union
            {
                itanium_operator_info info; /* Opérateur simple            */


            };

        } operator;

        /* ICT_NON_VIRTUAL_OFFSET */
        /* ICT_VIRTUAL_OFFSET */
        ssize_t offset;                     /* Décallage de fonction       */

        /* ICT_TYPE */
        GDataType *dtype;                   /* Type instancié              */


        /* ICT_* */
        struct
        {
            itanium_component *left;        /* Elément premier             */
            itanium_component *right;       /* Elément second              */

        } binary;

        /* ICT_* */
        struct
        {
            itanium_component *first;       /* Elément premier             */
            itanium_component *second;      /* Elément second              */
            itanium_component *third;       /* Elément troisième           */

        } ternary;

        /* ICT_* */
        itanium_component *unary;           /* Sous-élément                */

    };

};



#endif  /* _FORMAT_MANGLING_ITANIUM_ABI2_H */