summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
authorErich Keane <erich.keane@intel.com>2018-12-04 14:34:09 +0000
committerErich Keane <erich.keane@intel.com>2018-12-04 14:34:09 +0000
commit0a6b5b653ee47234674614fecc213c1d73bb1e28 (patch)
tree3de28f49966adcfaf8a1f6540c083b4dc5f7d92a /clang/test
parent924f98e579b04e72c849f8dd3cd9b84cfdd57c06 (diff)
downloadbcm5719-llvm-0a6b5b653ee47234674614fecc213c1d73bb1e28.tar.gz
bcm5719-llvm-0a6b5b653ee47234674614fecc213c1d73bb1e28.zip
PTH-- Remove feature entirely-
When debugging a boost build with a modified version of Clang, I discovered that the PTH implementation stores TokenKind in 8 bits. However, we currently have 368 TokenKinds. The result is that the value gets truncated and the wrong token gets picked up when including PTH files. It seems that this will go wrong every time someone uses a token that uses the 9th bit. Upon asking on IRC, it was brought up that this was a highly experimental features that was considered a failure. I discovered via googling that BoostBuild (mostly Boost.Math) is the only user of this feature, using the CC1 flag directly. I believe that this can be transferred over to normal PCH with minimal effort: https://github.com/boostorg/build/issues/367 Based on advice on IRC and research showing that this is a nearly completely unused feature, this patch removes it entirely. Note: I considered leaving the build-flags in place and making them emit an error/warning, however since I've basically identified and warned the only user, it seemed better to just remove them. Differential Revision: https://reviews.llvm.org/D54547 Change-Id: If32744275ef1f585357bd6c1c813d96973c4d8d9 llvm-svn: 348266
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/Driver/pth.c12
-rw-r--r--clang/test/PCH/emit-pth.c7
-rw-r--r--clang/test/PCH/pth.c7
-rw-r--r--clang/test/Preprocessor/include-pth.c3
4 files changed, 0 insertions, 29 deletions
diff --git a/clang/test/Driver/pth.c b/clang/test/Driver/pth.c
deleted file mode 100644
index e56c34c93bb..00000000000
--- a/clang/test/Driver/pth.c
+++ /dev/null
@@ -1,12 +0,0 @@
-// Test transparent PTH support.
-
-// RUN: %clang -no-canonical-prefixes -ccc-pch-is-pth -x c-header %s -o %t.h.pth -### 2> %t.log
-// RUN: FileCheck -check-prefix CHECK1 -input-file %t.log %s
-
-// CHECK1: "{{.*[/\\]}}clang{{.*}}" "-cc1" {{.*}} "-o" "{{.*}}.h.pth" "-x" "c-header" "{{.*}}pth.c"
-
-// RUN: touch %t.h.pth
-// RUN: %clang -no-canonical-prefixes -ccc-pch-is-pth -E -include %t.h %s -### 2> %t.log
-// RUN: FileCheck -check-prefix CHECK2 -input-file %t.log %s
-
-// CHECK2: "{{.*[/\\]}}clang{{.*}}" "-cc1" {{.*}}"-include-pth" "{{.*}}.h.pth" {{.*}}"-x" "c" "{{.*}}pth.c"
diff --git a/clang/test/PCH/emit-pth.c b/clang/test/PCH/emit-pth.c
deleted file mode 100644
index 2c0fba7f093..00000000000
--- a/clang/test/PCH/emit-pth.c
+++ /dev/null
@@ -1,7 +0,0 @@
-// RUN: %clang_cc1 -triple i386-unknown-unknown -emit-pth -o %t1 %s
-// RUN: %clang_cc1 -triple i386-unknown-unknown -emit-pth -o - %s > %t2
-// RUN: cmp %t1 %t2
-// RUN: %clang_cc1 -triple i386-unknown-unknown -emit-pth -o - %s | \
-// RUN: FileCheck %s
-
-// CHECK: cfe-pth
diff --git a/clang/test/PCH/pth.c b/clang/test/PCH/pth.c
deleted file mode 100644
index 6f2e4fc7b53..00000000000
--- a/clang/test/PCH/pth.c
+++ /dev/null
@@ -1,7 +0,0 @@
-// RUN: %clang_cc1 -triple i386-unknown-unknown -emit-pth -o %t %S/pth.h
-// RUN: not %clang_cc1 -triple i386-unknown-unknown -include-pth %t -fsyntax-only %s 2>&1 | FileCheck %s
-
-#error This is the only diagnostic
-
-// CHECK: This is the only diagnostic
-// CHECK: 1 error generated.
diff --git a/clang/test/Preprocessor/include-pth.c b/clang/test/Preprocessor/include-pth.c
deleted file mode 100644
index e1d6685d1fa..00000000000
--- a/clang/test/Preprocessor/include-pth.c
+++ /dev/null
@@ -1,3 +0,0 @@
-// RUN: %clang_cc1 -emit-pth %s -o %t
-// RUN: %clang_cc1 -include-pth %t %s -E | grep 'file_to_include' | count 2
-#include "file_to_include.h"
OpenPOWER on IntegriCloud