diff options
Diffstat (limited to 'tools/driver/driver.cpp')
-rw-r--r-- | tools/driver/driver.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/driver/driver.cpp b/tools/driver/driver.cpp index 353d06fb14..de2b899bfa 100644 --- a/tools/driver/driver.cpp +++ b/tools/driver/driver.cpp @@ -16,6 +16,7 @@ #include "clang/Driver/ArgList.h" #include "clang/Driver/Compilation.h" #include "clang/Driver/Driver.h" +#include "clang/Driver/DriverDiagnostic.h" #include "clang/Driver/OptTable.h" #include "clang/Driver/Option.h" #include "clang/Driver/Options.h" @@ -470,8 +471,10 @@ int main(int argc_, const char **argv_) { Res = TheDriver.ExecuteCompilation(*C, FailingCommand); // Force a crash to test the diagnostics. - if(::getenv("FORCE_CLANG_DIAGNOSTICS_CRASH")) - Res = -1; + if (::getenv("FORCE_CLANG_DIAGNOSTICS_CRASH")) { + Diags.Report(diag::err_drv_force_crash) << "FORCE_CLANG_DIAGNOSTICS_CRASH"; + Res = -1; + } // If result status is < 0, then the driver command signalled an error. // If result status is 70, then the driver command reported a fatal error. |