This is a reboot of D117778 on the clang side. This option will generate IR using typed pointers and then convert it to opaque pointers at the end for printing purposes only. This allows making the test output compatible with opaque pointers, while continuing to test typed pointers.
The migration plan here would be:
- Gradually convert ~2.5k affected clang tests to -normalize-opaque-pointers (without losing typed pointer coverage).
- Flip the default to enable opaque pointers in clang.
- Gradually convert tests to use opaque pointers in llvm/, while losing typed pointer coverage.
- Flip the default to enable opaque pointers in LLVM.
Alternatively we can directly migrate clang tests to use opaque pointers before the default switch. This would carry a higher risk of breaking typed pointer support while it is still the default.
This patch just migrates a single test, but I have some half-finished automation for helping with mass migration.