summaryrefslogtreecommitdiffstats
path: root/clang/test/Modules
diff options
context:
space:
mode:
authorLubos Lunak <l.lunak@centrum.cz>2019-09-18 19:09:41 +0000
committerLubos Lunak <l.lunak@centrum.cz>2019-09-18 19:09:41 +0000
commit533434fc728ad457533fac2c8c4ef7b8906dd05e (patch)
tree52a84682aa11d89302af2d50f41588961fa89640 /clang/test/Modules
parent5741d19f046f24450ebda3a421a8ce49043ad2b8 (diff)
downloadbcm5719-llvm-533434fc728ad457533fac2c8c4ef7b8906dd05e.tar.gz
bcm5719-llvm-533434fc728ad457533fac2c8c4ef7b8906dd05e.zip
make -frewrite-includes also rewrite conditions in #if/#elif
Those conditions may use __has_include, which needs to be rewritten. The existing code has already tried to rewrite just __has_include, but it didn't work with macro expansion, so e.g. Qt's "#define QT_HAS_INCLUDE(x) __has_include(x)" didn't get handled properly. Since the preprocessor run knows what each condition evaluates to, just rewrite the entire condition. This of course requires that the -frewrite-include pass has the same setup as the following compilation, but that has always been the requirement. Differential Revision: https://reviews.llvm.org/D63508 llvm-svn: 372248
Diffstat (limited to 'clang/test/Modules')
-rw-r--r--clang/test/Modules/preprocess-module.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/test/Modules/preprocess-module.cpp b/clang/test/Modules/preprocess-module.cpp
index b0cbac18e78..ee909a81183 100644
--- a/clang/test/Modules/preprocess-module.cpp
+++ b/clang/test/Modules/preprocess-module.cpp
@@ -51,7 +51,7 @@
// RUN: %clang_cc1 -fmodules -fmodule-file=%t/file.rewrite.pcm %s -I%t -verify -fno-modules-error-recovery -DFILE_REWRITE -DINCLUDE -I%S/Inputs/preprocess
//
// Check that we can preprocess this user of the .pcm file.
-// RUN: %clang_cc1 -fmodules -fmodule-file=%t/file.pcm %s -I%t -E -frewrite-imports -o %t/preprocess-module.ii
+// RUN: %clang_cc1 -fmodules -fmodule-file=%t/file.pcm %s -I%t -E -frewrite-imports -DFILE_REWRITE_FULL -o %t/preprocess-module.ii
// RUN: %clang_cc1 -fmodules %t/preprocess-module.ii -verify -fno-modules-error-recovery -DFILE_REWRITE_FULL
//
// Check that language / header search options are ignored when preprocessing from a .pcm file.
OpenPOWER on IntegriCloud