When #pragma clang __debug crash is used, currently Driver::generateCompilationDiagnostics() doesn't work. The clang -E created for diagnostics would crash again, because it reaches Pragma.cpp, L1043 again.
We simply disable the intended crashing behavior with a new cc1 flag -disable-pragma-debug-crash.
Notes:
- #pragma clang __debug llvm_report_fatal isn't currently tested below, because it needs exit() to be handled differently in -fintegrated-cc1 mode.
- This patch is also needed to further test that -MF is removed from the gen crash diagnostic cmd-line (currently not the case).
This patch is point 1. in D73742
Maybe also add to the description that you're removing this one. And does this mean we can drop the CrashRecoveryContext.h include?