Commit 7d3d4de
committed
Fixup IdentifierInfo Key Confusion
Clang has two sources of IdentifierInfo pointers: the ASTContext and the
Preprocessor. Even though the keys from each can be used to index into
the other's tables, doing so has detrimental effects on the Clang
Importer.
At the very least, it will cause the Clang Importer to re-load modules
that should have already been cached down by implicit module builds.
This is because the module will build itself against a properly interned
key from the Preprocessor, but be looked up by a key from the ASTContext
after the next time.
Once in a blue moon, this may even allow Clang to return garbage to us,
though I'm still verifying that. For now, let's patch up this mess by
using the right source of keys.1 parent fcb0b2b commit 7d3d4de
1 file changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1714 | 1714 | | |
1715 | 1715 | | |
1716 | 1716 | | |
1717 | | - | |
1718 | 1717 | | |
1719 | 1718 | | |
1720 | 1719 | | |
| |||
1728 | 1727 | | |
1729 | 1728 | | |
1730 | 1729 | | |
1731 | | - | |
1732 | | - | |
| 1730 | + | |
| 1731 | + | |
| 1732 | + | |
1733 | 1733 | | |
1734 | 1734 | | |
1735 | 1735 | | |
| |||
0 commit comments