Update pass manager to handle generate_summary/transform functions
Tom Tromey
tromey@redhat.com
Mon Jul 7 21:31:00 GMT 2008
>>>>> "Rafael" == Rafael Espindola <espindola@google.com> writes:
Rafael> It turns out that the problem is on keeping in_system_headers
Rafael> updated. Instead of finding and fixing a particular case, I decided to
Rafael> try to make the API a little bit less error prone.
Rafael> The attached patch creates a static global_in_system_headers to be
Rafael> used when cfun is NULL and two helper functions: in_system_headers()
Rafael> and set_system_headers().
Rafael> It fixes the testcase, bootstraps on linux x86-64 and is currently
Rafael> being tested. OK for trunk if the tests are OK?
With mapped locations, system-header-ness is encoded into a
location_t. So, I think it should be possible to remove the global
in_system_header, and then change DECL_IN_SYSTEM_HEADER to simply
check the decl's location. Uses of in_system_header in a front end
can simply look at the appropriate location -- the current token's
location for the parser, the location of some expression, or
input_location as a last resort.
I think this not should be much more work than what you have done, and
IMO it would be preferable because it would remove a global.
Tom
More information about the Gcc-patches
mailing list