summaryrefslogtreecommitdiffstats
path: root/clang/test/Modules/crash-vfs-path-symlink-component.m
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2017-04-29 00:34:47 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2017-04-29 00:34:47 +0000
commitc51c38b4ec63ca17f5d38ec73b218a0247b39ace (patch)
treea2c3032fc1feb995c824e078a39c82086319a6d1 /clang/test/Modules/crash-vfs-path-symlink-component.m
parent6fdcb3c2cea9af306285867f4b4132e4149af8a6 (diff)
downloadbcm5719-llvm-c51c38b4ec63ca17f5d38ec73b218a0247b39ace.tar.gz
bcm5719-llvm-c51c38b4ec63ca17f5d38ec73b218a0247b39ace.zip
Add pragma to perform module import and use it in -E output.
Many of our supported configurations support modules but do not have any first-class syntax to perform a module import. This leaves us with a problem: there is no way to represent the expansion of a #include that imports a module in the -E output for such languages. (We don't want to just leave it as a #include because that requires the consumer of the preprocessed source to have the same file system layout and include paths as the creator.) This patch adds a new pragma: #pragma clang module import MODULE.NAME.HERE that imports a module, and changes -E and -frewrite-includes to use it when rewriting a #include that maps to a module import. We don't make any attempt to use a native language syntax import if one exists, to get more consistent output. (If in the future, @import and #include have different semantics in some way, the pragma will track the #include semantics.) llvm-svn: 301725
Diffstat (limited to 'clang/test/Modules/crash-vfs-path-symlink-component.m')
-rw-r--r--clang/test/Modules/crash-vfs-path-symlink-component.m4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/test/Modules/crash-vfs-path-symlink-component.m b/clang/test/Modules/crash-vfs-path-symlink-component.m
index 5be492514a0..4723a77c7e9 100644
--- a/clang/test/Modules/crash-vfs-path-symlink-component.m
+++ b/clang/test/Modules/crash-vfs-path-symlink-component.m
@@ -28,7 +28,7 @@
// CHECK-NEXT: note: diagnostic msg: {{.*}}.m
// CHECK-NEXT: note: diagnostic msg: {{.*}}.cache
-// CHECKSRC: @import cstd.stdio;
+// CHECKSRC: #pragma clang module import cstd.stdio
// CHECKSH: # Crash reproducer
// CHECKSH-NEXT: # Driver args: "-fsyntax-only"
@@ -65,4 +65,4 @@
// RUN: -fmodules-cache-path=%t/m/ 2>&1 \
// RUN: | FileCheck %s --check-prefix=CHECKOVERLAY
-// CHECKOVERLAY: @import cstd.stdio; /* clang -E: implicit import for "/{{[^ ].*}}/i/usr/x/../stdio.h" */
+// CHECKOVERLAY: #pragma clang module import cstd.stdio /* clang -E: implicit import
OpenPOWER on IntegriCloud