From 416ada0f75bab22b084a1776deb229cd4a669c4d Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Thu, 1 Jun 2017 20:58:49 +0000 Subject: Vendor import of clang trunk r304460: https://llvm.org/svn/llvm-project/cfe/trunk@304460 --- test/Modules/preprocess-module.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'test/Modules/preprocess-module.cpp') diff --git a/test/Modules/preprocess-module.cpp b/test/Modules/preprocess-module.cpp index eaab3136938f..9d1a2bb6801f 100644 --- a/test/Modules/preprocess-module.cpp +++ b/test/Modules/preprocess-module.cpp @@ -14,8 +14,6 @@ // RUN: FileCheck %s --input-file %t/rewrite.ii --check-prefix=CHECK --check-prefix=REWRITE // Check that we can build a module from the preprocessed output. -// FIXME: For now, we need the headers to exist. -// RUN: touch %t/file.h %t/file2.h // RUN: %clang_cc1 -fmodules -fmodule-name=file -fmodule-file=%t/fwd.pcm -x c++-module-map-cpp-output %t/no-rewrite.ii -emit-module -o %t/no-rewrite.pcm // RUN: %clang_cc1 -fmodules -fmodule-name=file -fmodule-file=%t/fwd.pcm -x c++-module-map-cpp-output %t/rewrite.ii -emit-module -o %t/rewrite.pcm @@ -27,6 +25,8 @@ // Check the module we built works. // RUN: %clang_cc1 -fmodules -fmodule-file=%t/no-rewrite.pcm %s -I%t -verify -fno-modules-error-recovery // RUN: %clang_cc1 -fmodules -fmodule-file=%t/rewrite.pcm %s -I%t -verify -fno-modules-error-recovery -DREWRITE +// RUN: %clang_cc1 -fmodules -fmodule-file=%t/no-rewrite.pcm %s -I%t -verify -fno-modules-error-recovery -DINCLUDE -I%S/Inputs/preprocess +// RUN: %clang_cc1 -fmodules -fmodule-file=%t/rewrite.pcm %s -I%t -verify -fno-modules-error-recovery -DREWRITE -DINCLUDE -I%S/Inputs/preprocess // == module map @@ -102,7 +102,11 @@ __FILE *a; // expected-error {{declaration of '__FILE' must be imported}} // expected-note@no-rewrite.ii:1 {{here}} #endif +#ifdef INCLUDE +#include "file.h" +#else #pragma clang module import file +#endif FILE *b; -int x = file2; +int x = file2; // ok, found in file2.h, even under -DINCLUDE -- cgit v1.3