This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

How to access the function body of a constructor?



I am trying to access the body of a constructor.
My pass is hooked after pass_ipa_pta.

Constructor for a class is invoked as :

    __comp_ctor  (&b);

However the constructor body is dumped as
    __base_ctor  (struct B * const this)
    {
        :
    }

I am not able to access basic blocks from __comp_ctor?
Is __comp_ctor a cloned function of  __base_ctor?

Also assuming it to be a cloned function, I tried to access it using "clones", "clones_of" fields of structure cgraph_node. But these fields does not store anything (or at least for the functions I tried).
What does these fields (clones, clone_of etc.) store?

Will the macro DECL_CLONED_FUNCTION give me __base_ctor from __comp_ctor ?
I tried using it but it gives an error, "undefined symbol: _Z22decl_cloned_function_pPK9tree_nodeb".
Kindly tell me way to access the constructor body.

Regards,
Swati


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]