diff options
| author | Richard Smith <richard-llvm@metafoo.co.uk> | 2016-04-08 00:09:53 +0000 |
|---|---|---|
| committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2016-04-08 00:09:53 +0000 |
| commit | 466a15ef7fa51bf7a4c4f870e88443f9bc895e4d (patch) | |
| tree | 234b6b3b466ba706d647fb0f087054ed1b97b2fc /clang/test/Modules | |
| parent | e0a7ffa6cb4ccb95a22918ea395e7591fe26daf2 (diff) | |
| download | bcm5719-llvm-466a15ef7fa51bf7a4c4f870e88443f9bc895e4d.tar.gz bcm5719-llvm-466a15ef7fa51bf7a4c4f870e88443f9bc895e4d.zip | |
[modules] Don't write @import in -E output if the current language mode doesn't
support @import; use the form as written instead.
llvm-svn: 265756
Diffstat (limited to 'clang/test/Modules')
| -rw-r--r-- | clang/test/Modules/preprocess.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/clang/test/Modules/preprocess.cpp b/clang/test/Modules/preprocess.cpp new file mode 100644 index 00000000000..aa28191722a --- /dev/null +++ b/clang/test/Modules/preprocess.cpp @@ -0,0 +1,22 @@ +// RUN: rm -rf %t +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I %S/Inputs -x c++ -E %s | \ +// RUN: FileCheck -strict-whitespace %s --check-prefix=CHECK --check-prefix=CXX +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I %S/Inputs -x objective-c -E %s | \ +// RUN: FileCheck -strict-whitespace %s --check-prefix=CHECK --check-prefix=OBJC +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I %S/Inputs -x c++ -E -frewrite-includes %s | \ +// RUN: FileCheck -strict-whitespace %s --check-prefix=CHECK --check-prefix=CXX +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I %S/Inputs -x objective-c -E -frewrite-includes %s | \ +// RUN: FileCheck -strict-whitespace %s --check-prefix=CHECK --check-prefix=OBJC +#include "dummy.h" +#include "dummy.h" +foo bar baz + +// The weird {{ }} here is to prevent the -frewrite-includes test from matching its own CHECK lines. + +// CXX: #include{{ }}"dummy.h" +// CXX: #include{{ }}"dummy.h" +// CXX: foo bar baz + +// OBJC: @import{{ }}dummy; /* clang +// OBJC: @import{{ }}dummy; /* clang +// OBJC: foo bar baz |

