[PATCH] Add a separate llvm.global_ctors entry for linkonce_odr data initializers
Rafael EspĂndola
rafael.espindola at gmail.com
Thu Aug 22 10:09:52 PDT 2013
> + } else if (D->getInstantiatedFromStaticDataMember()) {
> + // Initializers of static data members of class template specializations are
> + // not guaranteed to run in any order with respect to the rest of the
> + // initializers in a TU. As a consequence, we can put them into their own
> + // llvm.global_ctors entry. This should allow GlobalOpt to fire more often.
> + AddGlobalCtor(Fn);
> + DelayedCXXInitPosition.erase(D);
Is there a standard section you can quote or refer to in here?
LGTM with that.
Cheers,
Rafael
More information about the cfe-commits
mailing list