Gcc Plugin - C++ static initializers

Pedro Lopes pedro.fraiao@gmail.com
Fri Apr 21 11:20:00 GMT 2017


How can I identify if a function is the initializer for the static
variables of my class on my plugin?

When I look at the intermediate files of a gcc compilation I get
something like this:

;; Function (static initializers for src/core/MyClass.cpp)
(_GLOBAL__sub_I__ZN7test3Gic8int_distE, funcdef_no=50, decl_uid=5333,
cgraph_uid=45, symbol_order=126) (executed once)

... (function body) ...

The thing is that I need to identify this type of function because
I've a different kind of processing in my plugin for the static
initializers. Somehow I do not seem have no find anything which can
identify them.


More information about the Gcc-help mailing list