diff options
| author | Erich Keane <erich.keane@intel.com> | 2017-11-20 17:57:42 +0000 |
|---|---|---|
| committer | Erich Keane <erich.keane@intel.com> | 2017-11-20 17:57:42 +0000 |
| commit | 5c086c7626fab2617c0178a3951378bcbce2271c (patch) | |
| tree | e073f8fc692b20d4dfcd8aead20817d8bf883db1 /clang/test/Driver | |
| parent | 991447d6f892f4763347528290093c10806ece74 (diff) | |
| download | bcm5719-llvm-5c086c7626fab2617c0178a3951378bcbce2271c.tar.gz bcm5719-llvm-5c086c7626fab2617c0178a3951378bcbce2271c.zip | |
For Linux/gnu compatibility, preinclude <stdc-predef.h> if the file is available
As reported in llvm bugzilla 32377.
Here’s a patch to add preinclude of stdc-predef.h.
The gcc documentation says “On GNU/Linux, <stdc-predef.h> is pre-included.”
See https://gcc.gnu.org/gcc-4.8/porting_to.html;
The preinclude is inhibited with –ffreestanding.
Basically I fixed the failing test cases by adding –ffreestanding which inhibits
this behavior.
I fixed all the failing tests, including some in extra/test, there's a separate
patch for that which is linked here
Patch By: mibintc
Differential Revision: https://reviews.llvm.org/D34158
llvm-svn: 318669
Diffstat (limited to 'clang/test/Driver')
| -rw-r--r-- | clang/test/Driver/crash-report-header.h | 2 | ||||
| -rw-r--r-- | clang/test/Driver/crash-report-spaces.c | 2 | ||||
| -rw-r--r-- | clang/test/Driver/crash-report.c | 3 | ||||
| -rw-r--r-- | clang/test/Driver/rewrite-map-in-diagnostics.c | 2 |
4 files changed, 5 insertions, 4 deletions
diff --git a/clang/test/Driver/crash-report-header.h b/clang/test/Driver/crash-report-header.h index e0193cbe45e..97dcdf9348b 100644 --- a/clang/test/Driver/crash-report-header.h +++ b/clang/test/Driver/crash-report-header.h @@ -1,6 +1,6 @@ // RUN: rm -rf %t // RUN: mkdir %t -// RUN: not env TMPDIR="%t" TEMP="%t" TMP="%t" RC_DEBUG_OPTIONS=1 %clang -fsyntax-only %s 2>&1 | FileCheck %s +// RUN: not env TMPDIR="%t" TEMP="%t" TMP="%t" RC_DEBUG_OPTIONS=1 %clang -ffreestanding -fsyntax-only %s 2>&1 | FileCheck %s // RUN: cat %t/crash-report-header-*.h | FileCheck --check-prefix=CHECKSRC "%s" // RUN: cat %t/crash-report-header-*.sh | FileCheck --check-prefix=CHECKSH "%s" // REQUIRES: crash-recovery diff --git a/clang/test/Driver/crash-report-spaces.c b/clang/test/Driver/crash-report-spaces.c index 3e95a0de251..8433884ff95 100644 --- a/clang/test/Driver/crash-report-spaces.c +++ b/clang/test/Driver/crash-report-spaces.c @@ -1,7 +1,7 @@ // RUN: rm -rf "%t" // RUN: mkdir "%t" // RUN: cp "%s" "%t/crash report spaces.c" -// RUN: not env TMPDIR="%t" TEMP="%t" TMP="%t" RC_DEBUG_OPTIONS=1 %clang -fsyntax-only "%t/crash report spaces.c" 2>&1 | FileCheck "%s" +// RUN: not env TMPDIR="%t" TEMP="%t" TMP="%t" RC_DEBUG_OPTIONS=1 %clang -ffreestanding -fsyntax-only "%t/crash report spaces.c" 2>&1 | FileCheck "%s" // RUN: cat "%t/crash report spaces"-*.c | FileCheck --check-prefix=CHECKSRC "%s" // RUN: cat "%t/crash report spaces"-*.sh | FileCheck --check-prefix=CHECKSH "%s" // REQUIRES: crash-recovery diff --git a/clang/test/Driver/crash-report.c b/clang/test/Driver/crash-report.c index a3f1f9e72a5..af7b245e626 100644 --- a/clang/test/Driver/crash-report.c +++ b/clang/test/Driver/crash-report.c @@ -2,7 +2,7 @@ // RUN: mkdir %t // RUN: not env TMPDIR=%t TEMP=%t TMP=%t RC_DEBUG_OPTIONS=1 \ // RUN: CC_PRINT_HEADERS=1 CC_LOG_DIAGNOSTICS=1 \ -// RUN: %clang -fsyntax-only %s \ +// RUN: %clang -fsyntax-only -ffreestanding %s \ // RUN: -F/tmp/ -I /tmp/ -idirafter /tmp/ -iquote /tmp/ -isystem /tmp/ \ // RUN: -iprefix /the/prefix -iwithprefix /tmp -iwithprefixbefore /tmp/ \ // RUN: -Xclang -internal-isystem -Xclang /tmp/ \ @@ -42,5 +42,6 @@ FOO // CHECKSH-NOT: "-iwithprefixbefore" "/tmp/" // CHECKSH-NOT: "-internal-isystem" "/tmp/" // CHECKSH-NOT: "-internal-externc-isystem" "/tmp/" +// CHECKSH-NOT: "-fsystem-include-if-exists" "/tmp/" // CHECKSH-NOT: "-dwarf-debug-flags" // CHECKSH: "crash-report-{{[^ ]*}}.c" diff --git a/clang/test/Driver/rewrite-map-in-diagnostics.c b/clang/test/Driver/rewrite-map-in-diagnostics.c index 4aea0ec0314..cb08830ef2f 100644 --- a/clang/test/Driver/rewrite-map-in-diagnostics.c +++ b/clang/test/Driver/rewrite-map-in-diagnostics.c @@ -1,7 +1,7 @@ // RUN: rm -rf "%t" // RUN: mkdir -p "%t" // RUN: not env TMPDIR="%t" TEMP="%t" TMP="%t" RC_DEBUG_OPTION=1 \ -// RUN: %clang -fsyntax-only -frewrite-map-file %p/Inputs/rewrite.map %s 2>&1 \ +// RUN: %clang -ffreestanding -fsyntax-only -frewrite-map-file %p/Inputs/rewrite.map %s 2>&1 \ // RUN: | FileCheck %s #pragma clang __debug parser_crash |

