summaryrefslogtreecommitdiffstats
path: root/clang/test/Modules
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Modules')
-rw-r--r--clang/test/Modules/Inputs/crash-recovery/Frameworks/A.framework/Headers/A.h1
-rw-r--r--clang/test/Modules/Inputs/crash-recovery/Frameworks/B.framework/Headers/B.h1
-rw-r--r--clang/test/Modules/Inputs/crash-recovery/Frameworks/B.framework/Modules/module.modulemap5
-rw-r--r--clang/test/Modules/Inputs/crash-recovery/Frameworks/I.framework/Headers/I.h2
-rw-r--r--clang/test/Modules/Inputs/crash-recovery/Frameworks/I.framework/Modules/module.modulemap5
-rw-r--r--clang/test/Modules/Inputs/crash-recovery/Frameworks/module.modulemap2
-rw-r--r--clang/test/Modules/crash-vfs-umbrella-frameworks.m42
7 files changed, 58 insertions, 0 deletions
diff --git a/clang/test/Modules/Inputs/crash-recovery/Frameworks/A.framework/Headers/A.h b/clang/test/Modules/Inputs/crash-recovery/Frameworks/A.framework/Headers/A.h
new file mode 100644
index 00000000000..49c9fe07531
--- /dev/null
+++ b/clang/test/Modules/Inputs/crash-recovery/Frameworks/A.framework/Headers/A.h
@@ -0,0 +1 @@
+#include <B/B.h>
diff --git a/clang/test/Modules/Inputs/crash-recovery/Frameworks/B.framework/Headers/B.h b/clang/test/Modules/Inputs/crash-recovery/Frameworks/B.framework/Headers/B.h
new file mode 100644
index 00000000000..761540b09cb
--- /dev/null
+++ b/clang/test/Modules/Inputs/crash-recovery/Frameworks/B.framework/Headers/B.h
@@ -0,0 +1 @@
+// B.h
diff --git a/clang/test/Modules/Inputs/crash-recovery/Frameworks/B.framework/Modules/module.modulemap b/clang/test/Modules/Inputs/crash-recovery/Frameworks/B.framework/Modules/module.modulemap
new file mode 100644
index 00000000000..f6c6e7bf668
--- /dev/null
+++ b/clang/test/Modules/Inputs/crash-recovery/Frameworks/B.framework/Modules/module.modulemap
@@ -0,0 +1,5 @@
+framework module B [extern_c] {
+ umbrella header "B.h"
+ export *
+ module * { export * }
+}
diff --git a/clang/test/Modules/Inputs/crash-recovery/Frameworks/I.framework/Headers/I.h b/clang/test/Modules/Inputs/crash-recovery/Frameworks/I.framework/Headers/I.h
new file mode 100644
index 00000000000..f98baaa7bd3
--- /dev/null
+++ b/clang/test/Modules/Inputs/crash-recovery/Frameworks/I.framework/Headers/I.h
@@ -0,0 +1,2 @@
+
+#import <A/A.h>
diff --git a/clang/test/Modules/Inputs/crash-recovery/Frameworks/I.framework/Modules/module.modulemap b/clang/test/Modules/Inputs/crash-recovery/Frameworks/I.framework/Modules/module.modulemap
new file mode 100644
index 00000000000..912d39ecf3b
--- /dev/null
+++ b/clang/test/Modules/Inputs/crash-recovery/Frameworks/I.framework/Modules/module.modulemap
@@ -0,0 +1,5 @@
+framework module I [extern_c] {
+ umbrella header "I.h"
+ export *
+ module * { export * }
+}
diff --git a/clang/test/Modules/Inputs/crash-recovery/Frameworks/module.modulemap b/clang/test/Modules/Inputs/crash-recovery/Frameworks/module.modulemap
new file mode 100644
index 00000000000..0f6fcc0b5ad
--- /dev/null
+++ b/clang/test/Modules/Inputs/crash-recovery/Frameworks/module.modulemap
@@ -0,0 +1,2 @@
+framework module * [extern_c] {
+}
diff --git a/clang/test/Modules/crash-vfs-umbrella-frameworks.m b/clang/test/Modules/crash-vfs-umbrella-frameworks.m
new file mode 100644
index 00000000000..0454976b170
--- /dev/null
+++ b/clang/test/Modules/crash-vfs-umbrella-frameworks.m
@@ -0,0 +1,42 @@
+// REQUIRES: crash-recovery, shell
+
+// FIXME: This XFAIL is cargo-culted from crash-report.c. Do we need it?
+// XFAIL: mingw32
+
+// RUN: rm -rf %t
+// RUN: mkdir -p %t/i %t/m %t
+// RUN: cp -a %S/Inputs/crash-recovery/Frameworks %t/i/
+// RUN: mkdir -p %t/i/Frameworks/A.framework/Frameworks
+// RUN: ln -s ../../B.framework %t/i/Frameworks/A.framework/Frameworks/B.framework
+
+// RUN: not env FORCE_CLANG_DIAGNOSTICS_CRASH= TMPDIR=%t TEMP=%t TMP=%t \
+// RUN: %clang -nostdinc -fsyntax-only %s \
+// RUN: -F %/t/i/Frameworks -fmodules \
+// RUN: -fmodules-cache-path=%t/m/ 2>&1 | FileCheck %s
+
+// RUN: FileCheck --check-prefix=CHECKYAML %s -input-file \
+// RUN: %t/crash-vfs-*.cache/vfs/vfs.yaml
+// RUN: find %t/crash-vfs-*.cache/vfs | \
+// RUN: grep "B.framework/Headers/B.h" | count 1
+
+// CHECK: Preprocessed source(s) and associated run script(s) are located at:
+// CHECK-NEXT: note: diagnostic msg: {{.*}}.m
+// CHECK-NEXT: note: diagnostic msg: {{.*}}.cache
+
+// CHECKYAML: 'type': 'directory',
+// CHECKYAML: 'name': "/[[PATH:.*]]/i/Frameworks/A.framework/Frameworks/B.framework/Headers",
+// CHECKYAML-NEXT: 'contents': [
+// CHECKYAML-NEXT: {
+// CHECKYAML-NEXT: 'type': 'file',
+// CHECKYAML-NEXT: 'name': "B.h",
+// CHECKYAML-NEXT: 'external-contents': "/[[PATH]]/i/Frameworks/B.framework/Headers/B.h"
+
+// CHECKYAML: 'type': 'directory',
+// CHECKYAML: 'name': "/[[PATH]]/i/Frameworks/B.framework/Headers",
+// CHECKYAML-NEXT: 'contents': [
+// CHECKYAML-NEXT: {
+// CHECKYAML-NEXT: 'type': 'file',
+// CHECKYAML-NEXT: 'name': "B.h",
+// CHECKYAML-NEXT: 'external-contents': "/[[PATH]]/i/Frameworks/B.framework/Headers/B.h"
+
+@import I;
OpenPOWER on IntegriCloud