Geoffrey Keating wrote:
#import worked by setting a flag bit on cpplib's hash table. This is
somewhat annoying from a PCH perspective, and is kind of ugly too.
This patch changes the behaviour so that #import uses macro
definitions to track whether a header is included or not, and then
PCH works with it automatically.
Bootstrapped & tested on powerpc-darwin.
I'll wait a bit before committing it so that people can comment.
Does this work right with symlinks? #import depends on being able to
detect file identity (I know, bleah bad evil etc etc), so I should
think your guard macro needs to have an inode number or some such
embedded in it.
Unfortunately this is not a hypothetical issue, a build of Mac OS X
will likely go down in flames if you get this wrong, since there
are cases of multiple #imports through different paths but all
symlinking to a single file.
Yes, it now works by looking at the actual text of the #import. So,