I did some additional testing with the -normalize-opaque-pointers
approach, and unfortunately I don’t think this is going to be viable after all. My assumption here was that -opaque-pointers
and -normalize-opaque-pointers
would produce the same result in nearly all cases, but this turns out to not be the case.
For example, for a set of 311 OpenMP codegen tests passing -normalize-opaque-pointers
, 85 of them fail with -opaque-pointers
. There are various reasons for this. One is differences in constant expression folding. Another is differences in value names – and in basic block names in particular, which normally do not use FileCheck placeholders.
I don’t think the normalization approach makes sense if it produces different output in such a significant fraction of tests. So I think we should go with the first option. Based on the feedback, this would go as follows:
- Add
-no-opaque-pointers
to Clang tests that are affected by opaque pointers. - Enable opaque pointers in Clang by default.
- Wait a while so people following tip-of-trunk can incorporate the change and report any issues.
- Gradually remove
-no-opaque-pointers
from tests while updating check lines. At this point typed pointer support will likely start to bitrot (but we’ll still accept patches for fixing it).