r211572 - Driver: Restore proper naming of crashdump files

Justin Bogner mail at justinbogner.com
Tue Jun 24 01:01:02 PDT 2014


Author: bogner
Date: Tue Jun 24 03:01:01 2014
New Revision: 211572

URL: http://llvm.org/viewvc/llvm-project?rev=211572&view=rev
Log:
Driver: Restore proper naming of crashdump files

Based on a review of r211411 by Jordan Rose.

Modified:
    cfe/trunk/lib/Driver/Driver.cpp
    cfe/trunk/test/Driver/crash-report-modules.m
    cfe/trunk/test/Driver/crash-report.c

Modified: cfe/trunk/lib/Driver/Driver.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Driver.cpp?rev=211572&r1=211571&r2=211572&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Driver.cpp (original)
+++ cfe/trunk/lib/Driver/Driver.cpp Tue Jun 24 03:01:01 2014
@@ -1303,7 +1303,8 @@ Action *Driver::ConstructPhaseAction(con
     } else {
       OutputTy = Input->getType();
       if (!Args.hasFlag(options::OPT_frewrite_includes,
-                        options::OPT_fno_rewrite_includes, false))
+                        options::OPT_fno_rewrite_includes, false) &&
+          !CCGenDiagnostics)
         OutputTy = types::getPreprocessedType(OutputTy);
       assert(OutputTy != types::TY_INVALID &&
              "Cannot preprocess this input type!");

Modified: cfe/trunk/test/Driver/crash-report-modules.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/crash-report-modules.m?rev=211572&r1=211571&r2=211572&view=diff
==============================================================================
--- cfe/trunk/test/Driver/crash-report-modules.m (original)
+++ cfe/trunk/test/Driver/crash-report-modules.m Tue Jun 24 03:01:01 2014
@@ -5,11 +5,11 @@
 // RUN: %clang -fsyntax-only %s -I %S/Inputs/module                     \
 // RUN: -fmodules -fmodules-cache-path=/tmp/ -DFOO=BAR 2>&1 | FileCheck %s
 
-// RUN: FileCheck --check-prefix=CHECKSRC %s -input-file %t/crash-report-*.mi
+// RUN: FileCheck --check-prefix=CHECKSRC %s -input-file %t/crash-report-*.m
 // RUN: FileCheck --check-prefix=CHECKSH %s -input-file %t/crash-report-*.sh
 // REQUIRES: crash-recovery
 
-// because of the glob (*.mi, *.sh)
+// because of the glob (*.m, *.sh)
 // REQUIRES: shell
 
 // FIXME: This XFAIL is cargo-culted from crash-report.c. Do we need it?
@@ -19,7 +19,7 @@
 const int x = MODULE_MACRO;
 
 // CHECK: Preprocessed source(s) and associated run script(s) are located at:
-// CHECK-NEXT: note: diagnostic msg: {{.*}}.mi
+// CHECK-NEXT: note: diagnostic msg: {{.*}}.m
 // CHECK-NEXT: note: diagnostic msg: {{.*}}.cache
 
 // CHECKSRC: @import simple;

Modified: cfe/trunk/test/Driver/crash-report.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/crash-report.c?rev=211572&r1=211571&r2=211572&view=diff
==============================================================================
--- cfe/trunk/test/Driver/crash-report.c (original)
+++ cfe/trunk/test/Driver/crash-report.c Tue Jun 24 03:01:01 2014
@@ -6,11 +6,11 @@
 // RUN:  -Xclang -internal-isystem -Xclang /tmp/                         \
 // RUN:  -Xclang -internal-externc-isystem -Xclang /tmp/                 \
 // RUN:  -DFOO=BAR 2>&1 | FileCheck %s
-// RUN: cat %t/crash-report-*.i | FileCheck --check-prefix=CHECKSRC %s
+// RUN: cat %t/crash-report-*.c | FileCheck --check-prefix=CHECKSRC %s
 // RUN: cat %t/crash-report-*.sh | FileCheck --check-prefix=CHECKSH %s
 // REQUIRES: crash-recovery
 
-// because of the glob (*.i, *.sh)
+// because of the glob (*.c, *.sh)
 // REQUIRES: shell
 
 // RUN: not env FORCE_CLANG_DIAGNOSTICS_CRASH=1 %clang -fsyntax-only -x c /dev/null -lstdc++ 2>&1 | FileCheck %s
@@ -20,7 +20,7 @@
 
 #pragma clang __debug parser_crash
 // CHECK: Preprocessed source(s) and associated run script(s) are located at:
-// CHECK-NEXT: note: diagnostic msg: {{.*}}.i
+// CHECK-NEXT: note: diagnostic msg: {{.*}}.c
 FOO
 // CHECKSRC: FOO
 // CHECKSH: -cc1





More information about the cfe-commits mailing list