This is the mail archive of the
mailing list for the GCC project.
How to access the function body of a constructor?
- From: Swati Rathi <swatirathi at cse dot iitb dot ac dot in>
- To: GCC Development <gcc at gcc dot gnu dot org>
- Date: Mon, 15 Sep 2014 15:41:26 +0530
- Subject: How to access the function body of a constructor?
- Authentication-results: sourceware.org; auth=none
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 :
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
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:
Kindly tell me way to access the constructor body.