r302777 - Reverted r302775

Richard Smith via cfe-commits cfe-commits at lists.llvm.org
Thu May 11 01:43:13 PDT 2017


When you revert a patch (even one of your own), please say why you reverted
it in the commit message.

On 11 May 2017 1:38 am, "Serge Pavlov via cfe-commits" <
cfe-commits at lists.llvm.org> wrote:

Author: sepavloff
Date: Thu May 11 03:25:22 2017
New Revision: 302777

URL: http://llvm.org/viewvc/llvm-project?rev=302777&view=rev
Log:
Reverted r302775

Added:
    cfe/trunk/test/Driver/arm-darwin-builtin.c
      - copied unchanged from r302774, cfe/trunk/test/Driver/arm-
darwin-builtin.c
Modified:
    cfe/trunk/lib/Driver/Driver.cpp
    cfe/trunk/test/Driver/aarch64-cpus.c
    cfe/trunk/test/Driver/amdgpu-features.c
    cfe/trunk/test/Driver/arm-default-build-attributes.s
    cfe/trunk/test/Driver/cl-outputs.c
    cfe/trunk/test/Driver/clang_f_opts.c
    cfe/trunk/test/Driver/cuda-external-tools.cu
    cfe/trunk/test/Driver/debug-options.c
    cfe/trunk/test/Driver/gfortran.f90
    cfe/trunk/test/Driver/split-debug.h
    cfe/trunk/test/Driver/unknown-arg.c
    cfe/trunk/test/Index/index-attrs.c
    cfe/trunk/test/Index/index-attrs.cpp
    cfe/trunk/tools/driver/driver.cpp

Modified: cfe/trunk/lib/Driver/Driver.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/
Driver.cpp?rev=302777&r1=302776&r2=302777&view=diff
============================================================
==================
--- cfe/trunk/lib/Driver/Driver.cpp (original)
+++ cfe/trunk/lib/Driver/Driver.cpp Thu May 11 03:25:22 2017
@@ -598,8 +598,6 @@ Compilation *Driver::BuildCompilation(Ar
   bool CCCPrintPhases;

   InputArgList Args = ParseArgStrings(ArgList.slice(1));
-  if (Diags.hasErrorOccurred())
-    return nullptr;

   // Silence driver warnings if requested
   Diags.setIgnoreAllWarnings(Args.hasArg(options::OPT_w));

Modified: cfe/trunk/test/Driver/aarch64-cpus.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/
aarch64-cpus.c?rev=302777&r1=302776&r2=302777&view=diff
============================================================
==================
--- cfe/trunk/test/Driver/aarch64-cpus.c (original)
+++ cfe/trunk/test/Driver/aarch64-cpus.c Thu May 11 03:25:22 2017
@@ -11,7 +11,7 @@
 // RUN: %clang -target arm64 -### -c %s 2>&1 | FileCheck
-check-prefix=ARM64-GENERIC %s
 // RUN: %clang -target arm64 -mcpu=generic -### -c %s 2>&1 | FileCheck
-check-prefix=ARM64-GENERIC %s
 // RUN: %clang -target arm64 -mlittle-endian -### -c %s 2>&1 | FileCheck
-check-prefix=ARM64-GENERIC %s
-// RUN: %clang -target arm64 -mlittle-endian -mcpu=generic -### -c %s 2>&1
| FileCheck -check-prefix=ARM64-GENERIC %s
+// RUN: %clang -target arm64 -mlittle-endian -mcpu-generic -### -c %s 2>&1
| FileCheck -check-prefix=ARM64-GENERIC %s

 // ARM64-GENERIC: "-cc1"{{.*}} "-triple" "arm64{{.*}}" "-target-cpu"
"generic"


Modified: cfe/trunk/test/Driver/amdgpu-features.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/
amdgpu-features.c?rev=302777&r1=302776&r2=302777&view=diff
============================================================
==================
--- cfe/trunk/test/Driver/amdgpu-features.c (original)
+++ cfe/trunk/test/Driver/amdgpu-features.c Thu May 11 03:25:22 2017
@@ -1,7 +1,7 @@
-// RUN: %clang -### -target amdgcn -x cl -S -emit-llvm -mcpu=kaveri
-mamdgpu-debugger-abi=0.0 %s -o - 2>&1 \
+// RUN: %clang -### -target amdgcn -x cl -S -emit-llvm -mcpu=kaveri
-mamdgpu-debugger-abi=0.0 %s -o 2>&1 \
 // RUN:   | FileCheck --check-prefix=CHECK-MAMDGPU-DEBUGGER-ABI-0-0 %s
 // CHECK-MAMDGPU-DEBUGGER-ABI-0-0: the clang compiler does not support
'-mamdgpu-debugger-abi=0.0'

-// RUN: %clang -### -target amdgcn -x cl -S -emit-llvm -mcpu=kaveri
-mamdgpu-debugger-abi=1.0 %s -o - 2>&1 \
+// RUN: %clang -### -target amdgcn -x cl -S -emit-llvm -mcpu=kaveri
-mamdgpu-debugger-abi=1.0 %s -o 2>&1 \
 // RUN:   | FileCheck --check-prefix=CHECK-MAMDGPU-DEBUGGER-ABI-1-0 %s
 // CHECK-MAMDGPU-DEBUGGER-ABI-1-0: "-target-feature"
"+amdgpu-debugger-insert-nops" "-target-feature"
"+amdgpu-debugger-reserve-regs"
"-target-feature" "+amdgpu-debugger-emit-prologue"

Modified: cfe/trunk/test/Driver/arm-default-build-attributes.s
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/
arm-default-build-attributes.s?rev=302777&r1=302776&r2=302777&view=diff
============================================================
==================
--- cfe/trunk/test/Driver/arm-default-build-attributes.s (original)
+++ cfe/trunk/test/Driver/arm-default-build-attributes.s Thu May 11
03:25:22 2017
@@ -10,9 +10,9 @@

 // Option ignored C/C++ (since we always emit hardware and ABI build
attributes
 // during codegen).
-// RUN: %clang -target armv7--none-eabi -### -x c %s
-mdefault-build-attributes 2>&1 \
+// RUN: %clang -target armv7--none-eabi -### -x c %s
-mdefault-build-attributes -verify 2>&1 \
 // RUN:    | FileCheck %s -check-prefix CHECK-DISABLED
-// RUN: %clang -target armv7--none-eabi -### -x c++ %s
-mdefault-build-attributes 2>&1 \
+// RUN: %clang -target armv7--none-eabi -### -x c++ %s
-mdefault-build-attributes -verify 2>&1 \
 // RUN:    | FileCheck %s -check-prefix CHECK-DISABLED

 // CHECK-DISABLED-NOT: "-arm-add-build-attributes"

Modified: cfe/trunk/test/Driver/cl-outputs.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/
cl-outputs.c?rev=302777&r1=302776&r2=302777&view=diff
============================================================
==================
--- cfe/trunk/test/Driver/cl-outputs.c (original)
+++ cfe/trunk/test/Driver/cl-outputs.c Thu May 11 03:25:22 2017
@@ -73,7 +73,7 @@
 // RUN: %clang_cl /c /o .. -### -- %s 2>&1 | FileCheck
-check-prefix=oCRAZY2 %s
 // oCRAZY2:  "-o" "..obj"

-// RUN: not %clang_cl /c %s -### /o 2>&1 | FileCheck
-check-prefix=oMISSINGARG %s
+// RUN: %clang_cl /c %s -### /o 2>&1 | FileCheck -check-prefix=oMISSINGARG
%s
 // oMISSINGARG: error: argument to '/o' is missing (expected 1 value)

 // RUN: %clang_cl /c /omydir/ -### -- %s %s 2>&1 | FileCheck
-check-prefix=CHECK-oMULTIPLESOURCEOK1 %s
@@ -208,7 +208,7 @@
 // FeoDIRNAMEEXTDLL: "-out:foo.dir{{[/\\]+}}a.ext"
 // FeoDIRNAMEEXTDLL: "-implib:foo.dir{{[/\\]+}}a.lib"

-// RUN: not %clang_cl -### /o 2>&1 | FileCheck -check-prefix=FeoMISSINGARG
%s
+// RUN: %clang_cl -### /o 2>&1 | FileCheck -check-prefix=FeoMISSINGARG %s
 // FeoMISSINGARG: error: argument to '/o' is missing (expected 1 value)

 // RUN: %clang_cl /ofoo /o bar -### -- %s 2>&1 | FileCheck
-check-prefix=FeoOVERRIDE %s

Modified: cfe/trunk/test/Driver/clang_f_opts.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/
clang_f_opts.c?rev=302777&r1=302776&r2=302777&view=diff
============================================================
==================
--- cfe/trunk/test/Driver/clang_f_opts.c (original)
+++ cfe/trunk/test/Driver/clang_f_opts.c Thu May 11 03:25:22 2017
@@ -186,7 +186,7 @@
 // CHECK-NO-SLP-VECTORIZE-AGG-NOT: "-vectorize-slp-aggressive"

 // RUN: %clang -### -S -fextended-identifiers %s 2>&1 | FileCheck
-check-prefix=CHECK-EXTENDED-IDENTIFIERS %s
-// RUN: not %clang -### -S -fno-extended-identifiers %s 2>&1 | FileCheck
-check-prefix=CHECK-NO-EXTENDED-IDENTIFIERS %s
+// RUN: %clang -### -S -fno-extended-identifiers %s 2>&1 | FileCheck
-check-prefix=CHECK-NO-EXTENDED-IDENTIFIERS %s
 // CHECK-EXTENDED-IDENTIFIERS: "-cc1"
 // CHECK-EXTENDED-IDENTIFIERS-NOT: "-fextended-identifiers"
 // CHECK-NO-EXTENDED-IDENTIFIERS: error: unsupported option
'-fno-extended-identifiers'

Modified: cfe/trunk/test/Driver/cuda-external-tools.cu
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/
cuda-external-tools.cu?rev=302777&r1=302776&r2=302777&view=diff
============================================================
==================
--- cfe/trunk/test/Driver/cuda-external-tools.cu (original)
+++ cfe/trunk/test/Driver/cuda-external-tools.cu Thu May 11 03:25:22 2017
@@ -24,8 +24,8 @@
 // RUN: | FileCheck -check-prefix ARCH64 -check-prefix SM20 -check-prefix
DBG %s

 // --no-cuda-noopt-device-debug overrides --cuda-noopt-device-debug.
-// RUN: %clang -### -target x86_64-linux-gnu --cuda-noopt-device-debug \
-// RUN:   --no-cuda-noopt-device-debug -O2 -c %s 2>&1 \
+// RUN: %clang -### -target x86_64-linux-gnu --cuda-noopt-debug \
+// RUN:   --no-cuda-noopt-debug -O2 -c %s 2>&1 \
 // RUN: | FileCheck -check-prefix ARCH64 -check-prefix SM20 -check-prefix
OPT2 %s

 // Regular compile without -O.  This should result in us passing -O0 to
ptxas.

Modified: cfe/trunk/test/Driver/debug-options.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/
debug-options.c?rev=302777&r1=302776&r2=302777&view=diff
============================================================
==================
--- cfe/trunk/test/Driver/debug-options.c (original)
+++ cfe/trunk/test/Driver/debug-options.c Thu May 11 03:25:22 2017
@@ -80,7 +80,7 @@
 // RUN: %clang -### -c -gdwarf-2 %s 2>&1 \
 // RUN:             | FileCheck -check-prefix=G_ONLY_DWARF2 %s
 //
-// RUN: not %clang -### -c -gfoo %s 2>&1 | FileCheck -check-prefix=G_ERR %s
+// RUN: %clang -### -c -gfoo %s 2>&1 | FileCheck -check-prefix=G_NO %s
 // RUN: %clang -### -c -g -g0 %s 2>&1 | FileCheck -check-prefix=G_NO %s
 // RUN: %clang -### -c -ggdb0 %s 2>&1 | FileCheck -check-prefix=G_NO %s
 // RUN: %clang -### -c -glldb -g0 %s 2>&1 | FileCheck -check-prefix=G_NO %s
@@ -171,8 +171,6 @@
 // G_PS4: "-dwarf-version=
 // G_PS4: "-generate-arange-section"
 //
-// G_ERR: error: unknown argument:
-//
 // G_NO: "-cc1"
 // G_NO-NOT: -debug-info-kind=
 //

Modified: cfe/trunk/test/Driver/gfortran.f90
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/
gfortran.f90?rev=302777&r1=302776&r2=302777&view=diff
============================================================
==================
--- cfe/trunk/test/Driver/gfortran.f90 (original)
+++ cfe/trunk/test/Driver/gfortran.f90 Thu May 11 03:25:22 2017
@@ -106,6 +106,7 @@
 ! RUN:     -fsyntax-only \
 ! RUN:     -funderscoring \
 ! RUN:     -fwhole-file \
+! RUN:     -fworking-directory \
 ! RUN:     -imultilib \
 ! RUN:     -iprefix \
 ! RUN:     -iquote \
@@ -225,6 +226,7 @@
 ! CHECK: "-fstack-arrays"
 ! CHECK: "-funderscoring"
 ! CHECK: "-fwhole-file"
+! CHECK: "-fworking-directory"
 ! CHECK: "-imultilib"
 ! CHECK: "-iprefix"
 ! CHECK: "-iquote"

Modified: cfe/trunk/test/Driver/split-debug.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/
split-debug.h?rev=302777&r1=302776&r2=302777&view=diff
============================================================
==================
--- cfe/trunk/test/Driver/split-debug.h (original)
+++ cfe/trunk/test/Driver/split-debug.h Thu May 11 03:25:22 2017
@@ -3,4 +3,13 @@
 // RUN: %clang -target x86_64-unknown-linux-gnu -gsplit-dwarf -c -fmodules
-### %s 2> %t
 // RUN: FileCheck -check-prefix=CHECK-NO-ACTIONS < %t %s
 //
+// RUN: %clang -target x86_64-unknown-linux-gnu -gsplit-dwarf -c -fmodules
-emit-module -fmodules-embed-all-files -fno-implicit-modules
-fno-implicit-module-maps -### %s 2> %t
+// RUN: FileCheck -check-prefix=CHECK-NO-ACTIONS < %t %s
+//
+// FIXME: This should fail using clang, except that the type of the output
for
+// an object output with modules is given as clang::driver::types::TY_PCH
+// rather than TY_Object.
+// RUN: %clang -target x86_64-unknown-linux-gnu -gsplit-dwarf -c -fmodules
-fmodule-format=obj -### %s 2> %t
+// RUN: FileCheck -check-prefix=CHECK-NO-ACTIONS < %t %s
+//
 // CHECK-NO-ACTIONS-NOT: objcopy

Modified: cfe/trunk/test/Driver/unknown-arg.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/
unknown-arg.c?rev=302777&r1=302776&r2=302777&view=diff
============================================================
==================
--- cfe/trunk/test/Driver/unknown-arg.c (original)
+++ cfe/trunk/test/Driver/unknown-arg.c Thu May 11 03:25:22 2017
@@ -1,8 +1,8 @@
-// RUN: not %clang %s -cake-is-lie -%0 -%d -HHHH -munknown-to-clang-option
-print-stats -funknown-to-clang-option -### 2>&1 | \
+// RUN: %clang %s -cake-is-lie -%0 -%d -HHHH -munknown-to-clang-option
-print-stats -funknown-to-clang-option -### 2>&1 | \
 // RUN: FileCheck %s
 // RUN: %clang_cl -cake-is-lie -%0 -%d -HHHH -munknown-to-clang-option
-print-stats -funknown-to-clang-option -### -c -- %s 2>&1 | \
 // RUN: FileCheck %s --check-prefix=CL
-// RUN: not %clang_cl -cake-is-lie -%0 -%d -HHHH -munknown-to-clang-option
-print-stats -funknown-to-clang-option -c -Werror=unknown-argument -### --
%s 2>&1 | \
+// RUN: %clang_cl -cake-is-lie -%0 -%d -HHHH -munknown-to-clang-option
-print-stats -funknown-to-clang-option -c -Werror=unknown-argument -### --
%s 2>&1 | \
 // RUN: FileCheck %s --check-prefix=CL-ERROR
 // RUN: %clang_cl -cake-is-lie -%0 -%d -HHHH -munknown-to-clang-option
-print-stats -funknown-to-clang-option -c -Wno-unknown-argument -### -- %s
2>&1 | \
 // RUN: FileCheck %s --check-prefix=SILENT

Modified: cfe/trunk/test/Index/index-attrs.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Index/
index-attrs.c?rev=302777&r1=302776&r2=302777&view=diff
============================================================
==================
--- cfe/trunk/test/Index/index-attrs.c (original)
+++ cfe/trunk/test/Index/index-attrs.c Thu May 11 03:25:22 2017
@@ -1,16 +1,16 @@
-// RUN: c-index-test -index-file %s -target armv7-windows-gnu -fdeclspec
2>&1 | FileCheck %s
+// RUN: c-index-test -index-file -check-prefix CHECK %s -target
armv7-windows-gnu -fdeclspec

 void __declspec(dllexport) export_function(void) {}
-// CHECK: [indexDeclaration]: kind: function | name: export_function |
{{.*}} | lang: C
+// CHECK: [indexDeclaraton]: kind: function | name: export_function |
{{.*}} | lang: C
 // CHECK: <attribute>: attribute(dllexport)
 void __attribute__((dllexport)) export_gnu_attribute(void) {}
-// CHECK: [indexDeclaration]: kind: function | name: export_gnu_attribute
| {{.*}} | lang: C
+// CHECK: [indexDeclaration] kind: function | name: export_gnu_attribute |
{{.*}} | lang: C
 // CHECK: <attribute>: attribute(dllexport)

 void __declspec(dllimport) import_function(void);
-// CHECK: [indexDeclaration]: kind: function | name: import_function |
{{.*}} | lang: C
+// CHECK: [indexDeclaration] kind: function | name: import_function |
{{.*}} | lang: C
 // CHECK: <attribute>: attribute(dllimport)
 void __attribute__((dllimport)) import_gnu_attribute(void);
-// CHECK: [indexDeclaration]: kind: function | name: import_gnu_attribute
| {{.*}} | lang: C
+// CHECK: [indexDeclaration] kind: function | name: import_gnu_function |
{{.*}} | lang: C
 // CHECK: <attribute>: attribute(dllimport)


Modified: cfe/trunk/test/Index/index-attrs.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Index/
index-attrs.cpp?rev=302777&r1=302776&r2=302777&view=diff
============================================================
==================
--- cfe/trunk/test/Index/index-attrs.cpp (original)
+++ cfe/trunk/test/Index/index-attrs.cpp Thu May 11 03:25:22 2017
@@ -1,4 +1,4 @@
-// RUN: c-index-test -index-file %s -target armv7-windows-gnu -fdeclspec |
FileCheck %s
+// RUN: c-index-test -index-file -check-prefix CHECK %s -target
armv7-windows-gnu -fdeclspec

 struct __declspec(dllexport) export_s {
   void m();
@@ -19,7 +19,7 @@ struct __declspec(dllimport) import_s {
 class __attribute__((dllexport)) export_gnu_s {
   void m();
 };
-// CHECK: [indexDeclaration]: kind: c++-class | name: export_gnu_s |
{{.*}} | lang: C++
+// CHECK: [indexDeclaration]: kind: struct | name: export_gnu_s | {{.*}} |
lang: C++
 // CHECK: <attribute>: attribute(dllexport)
 // CHECK: [indexDeclaration]: kind: c++-instance-method | name: m | {{.*}}
| lang: C++
 // CHECK: <attribute>: attribute(dllexport)
@@ -27,24 +27,24 @@ class __attribute__((dllexport)) export_
 class __attribute__((dllimport)) import_gnu_s {
   void m();
 };
-// CHECK: [indexDeclaration]: kind: c++-class | name: import_gnu_s |
{{.*}} | lang: C++
+// CHECK: [indexDeclaration]: kind: struct | name: import_gnu_s | {{.*}} |
lang: C++
 // CHECK: <attribute>: attribute(dllimport)
 // CHECK: [indexDeclaration]: kind: c++-instance-method | name: m | {{.*}}
| lang: C++
 // CHECK: <attribute>: attribute(dllimport)

 extern "C" void __declspec(dllexport) export_function(void) {}
-// CHECK: [indexDeclaration]: kind: function | name: export_function |
{{.*}} | lang: C
+// CHECK: [indexDeclaraton]: kind: function | name: export_function |
{{.*}} | lang: C
 // CHECK: <attribute>: attribute(dllexport)
 extern "C" void __attribute__((dllexport)) export_gnu_function(void) {}
-// CHECK: [indexDeclaration]: kind: function | name: export_gnu_function |
{{.*}} | lang: C
+// CHECK: [indexDeclaraton]: kind: function | name: export_gnu_function |
{{.*}} | lang: C
 // CHECK: <attribute>: attribute(dllexport)

 extern "C" {
 void __declspec(dllimport) import_function(void);
-// CHECK: [indexDeclaration]: kind: function | name: import_function |
{{.*}} | lang: C
+// CHECK: [indexDeclaration] kind: function | name: import_function |
{{.*}} | lang: C
 // CHECK: <attribute>: attribute(dllimport)
 void __attribute__((dllimport)) import_gnu_function(void);
-// CHECK: [indexDeclaration]: kind: function | name: import_gnu_function |
{{.*}} | lang: C
+// CHECK: [indexDeclaration] kind: function | name: import_gnu_function |
{{.*}} | lang: C
 // CHECK: <attribute>: attribute(dllimport)
 }


Modified: cfe/trunk/tools/driver/driver.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/
driver/driver.cpp?rev=302777&r1=302776&r2=302777&view=diff
============================================================
==================
--- cfe/trunk/tools/driver/driver.cpp (original)
+++ cfe/trunk/tools/driver/driver.cpp Thu May 11 03:25:22 2017
@@ -454,41 +454,40 @@ int main(int argc_, const char **argv_)
   SetBackdoorDriverOutputsFromEnvVars(TheDriver);

   std::unique_ptr<Compilation> C(TheDriver.BuildCompilation(argv));
-  int Res = 1;
-  if (C.get()) {
-    SmallVector<std::pair<int, const Command *>, 4> FailingCommands;
+  int Res = 0;
+  SmallVector<std::pair<int, const Command *>, 4> FailingCommands;
+  if (C.get())
     Res = TheDriver.ExecuteCompilation(*C, FailingCommands);

-    // Force a crash to test the diagnostics.
-    if (TheDriver.GenReproducer) {
-      Diags.Report(diag::err_drv_force_crash)
+  // Force a crash to test the diagnostics.
+  if (TheDriver.GenReproducer) {
+    Diags.Report(diag::err_drv_force_crash)
         << !::getenv("FORCE_CLANG_DIAGNOSTICS_CRASH");

-      // Pretend that every command failed.
-      FailingCommands.clear();
-      for (const auto &J : C->getJobs())
-        if (const Command *C = dyn_cast<Command>(&J))
-          FailingCommands.push_back(std::make_pair(-1, C));
-    }
+    // Pretend that every command failed.
+    FailingCommands.clear();
+    for (const auto &J : C->getJobs())
+      if (const Command *C = dyn_cast<Command>(&J))
+        FailingCommands.push_back(std::make_pair(-1, C));
+  }

-    for (const auto &P : FailingCommands) {
-      int CommandRes = P.first;
-      const Command *FailingCommand = P.second;
-      if (!Res)
-        Res = CommandRes;
-
-      // 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.
-      // On Windows, abort will return an exit code of 3.  In these cases,
-      // generate additional diagnostic information if possible.
-      bool DiagnoseCrash = CommandRes < 0 || CommandRes == 70;
+  for (const auto &P : FailingCommands) {
+    int CommandRes = P.first;
+    const Command *FailingCommand = P.second;
+    if (!Res)
+      Res = CommandRes;
+
+    // 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.
+    // On Windows, abort will return an exit code of 3.  In these cases,
+    // generate additional diagnostic information if possible.
+    bool DiagnoseCrash = CommandRes < 0 || CommandRes == 70;
 #ifdef LLVM_ON_WIN32
-      DiagnoseCrash |= CommandRes == 3;
+    DiagnoseCrash |= CommandRes == 3;
 #endif
-      if (DiagnoseCrash) {
-        TheDriver.generateCompilationDiagnostics(*C, *FailingCommand);
-        break;
-      }
+    if (DiagnoseCrash) {
+      TheDriver.generateCompilationDiagnostics(*C, *FailingCommand);
+      break;
     }
   }



_______________________________________________
cfe-commits mailing list
cfe-commits at lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170511/4855a7df/attachment-0001.html>


More information about the cfe-commits mailing list