diff options
author | Erich Keane <erich.keane@intel.com> | 2018-08-17 13:43:39 +0000 |
---|---|---|
committer | Erich Keane <erich.keane@intel.com> | 2018-08-17 13:43:39 +0000 |
commit | cc56a9650522460610126a9162dc4c54e7d9315e (patch) | |
tree | 7725fd35164e60aa2e490db0edcdae175d60953c /test/Driver/cl-pch.cpp | |
parent | fe170f961ef352eee1aeec5decee8111a7fc9f4e (diff) | |
download | clang-cc56a9650522460610126a9162dc4c54e7d9315e.tar.gz |
Fix for bug 38508 - Don't do PCH processing when only generating preprocessor output
This clang-cl driver change removes the PCH options when we are only generating
preprocessed output. This is similar to the behavior of Y-.
Patch by: mikerice
Differential Revision: https://reviews.llvm.org/D50640
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@340025 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Driver/cl-pch.cpp')
-rw-r--r-- | test/Driver/cl-pch.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/test/Driver/cl-pch.cpp b/test/Driver/cl-pch.cpp index 8521d3576a..0103db93e1 100644 --- a/test/Driver/cl-pch.cpp +++ b/test/Driver/cl-pch.cpp @@ -345,3 +345,24 @@ // CHECK-NoSourceTP: pchfile.pch // CHECK-NoSourceTP: -x // CHECK-NoSourceTP: "c++" + +// If only preprocessing, PCH options are ignored. +// RUN: %clang_cl /P /Ycpchfile.h /FIpchfile.h /c -### -- %s 2>&1 \ +// RUN: | FileCheck -check-prefix=CHECK-YC-P %s +// CHECK-YC-P-NOT: -emit-pch +// CHECK-YC-P-NOT: -include-pch + +// RUN: %clang_cl /E /Ycpchfile.h /FIpchfile.h /c -### -- %s 2>&1 \ +// RUN: | FileCheck -check-prefix=CHECK-YC-E %s +// CHECK-YC-E-NOT: -emit-pch +// CHECK-YC-E-NOT: -include-pch + +// RUN: %clang_cl /P /Ycpchfile.h /FIpchfile.h /c -### -- %s 2>&1 \ +// RUN: | FileCheck -check-prefix=CHECK-YU-P %s +// CHECK-YU-P-NOT: -emit-pch +// CHECK-YU-P-NOT: -include-pch + +// RUN: %clang_cl /E /Ycpchfile.h /FIpchfile.h /c -### -- %s 2>&1 \ +// RUN: | FileCheck -check-prefix=CHECK-YU-E %s +// CHECK-YU-E-NOT: -emit-pch +// CHECK-YU-E-NOT: -include-pch |