Constructor parameters for global object initialization
Philipp Schoppe
phil.subscriptions@gmail.com
Fri Nov 29 20:46:00 GMT 2013
Hello,
I just started with developping GCC plugins. It works pretty well,
but there is one case I cannot seem to work out and I don't
find any specific information about it in the internet and GCC
internals docs.
In the case of test.cpp:
class test {
public:
test(int i) { _x = i; }
private:
int _x;
};
test glob_test(4);
int main() {
return 0;
}
How can I get the constructor statement of the VAR_DECL glob_test
and the given parameters? There seems to be no direct access to
any sort of constructor node and no __static_initialization..
FUNCTION_DECL seems to provide this information. debug_tree() does
not provide any hints on where the constructor information can be
found.
Kind regards,
Philipp
More information about the Gcc-help
mailing list