summaryrefslogtreecommitdiff
path: root/test/VFS
diff options
context:
space:
mode:
authorBen Langmuir <blangmuir@apple.com>2014-04-10 17:57:43 +0000
committerBen Langmuir <blangmuir@apple.com>2014-04-10 17:57:43 +0000
commit748f714550ae9260948b9bf79d79ce0964099259 (patch)
tree4646fbd533365cc3124a42357d2e692638a1d3a0 /test/VFS
parenteaa6166c172cb9ee3f81612b13e9bbda3a3d6330 (diff)
When module umbrellas change, rebuild them
With the VFS, it is easy to hit modified umbrellas by overriding the umbrella header, and what we want is to rebuild, not to fail. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@205975 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/VFS')
-rw-r--r--test/VFS/Inputs/Foo.framework/Headers/Foo.h0
-rw-r--r--test/VFS/Inputs/Foo.framework/Modules/module.modulemap3
-rw-r--r--test/VFS/Inputs/Foo.h0
-rw-r--r--test/VFS/Inputs/vfsoverlay.yaml3
-rw-r--r--test/VFS/umbrella-mismatch.m8
5 files changed, 14 insertions, 0 deletions
diff --git a/test/VFS/Inputs/Foo.framework/Headers/Foo.h b/test/VFS/Inputs/Foo.framework/Headers/Foo.h
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/test/VFS/Inputs/Foo.framework/Headers/Foo.h
diff --git a/test/VFS/Inputs/Foo.framework/Modules/module.modulemap b/test/VFS/Inputs/Foo.framework/Modules/module.modulemap
new file mode 100644
index 0000000000..0aab69f0af
--- /dev/null
+++ b/test/VFS/Inputs/Foo.framework/Modules/module.modulemap
@@ -0,0 +1,3 @@
+framework module Foo {
+ umbrella header "Foo.h"
+}
diff --git a/test/VFS/Inputs/Foo.h b/test/VFS/Inputs/Foo.h
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/test/VFS/Inputs/Foo.h
diff --git a/test/VFS/Inputs/vfsoverlay.yaml b/test/VFS/Inputs/vfsoverlay.yaml
index 331ed33316..5c1380870d 100644
--- a/test/VFS/Inputs/vfsoverlay.yaml
+++ b/test/VFS/Inputs/vfsoverlay.yaml
@@ -14,6 +14,9 @@
},
{ 'name': 'SomeFramework.framework/Headers/public_header.h', 'type': 'file',
'external-contents': 'INPUT_DIR/public_header.h'
+ },
+ { 'name': 'Foo.framework/Headers/Foo.h', 'type': 'file',
+ 'external-contents': 'INPUT_DIR/Foo.h'
}
]
}
diff --git a/test/VFS/umbrella-mismatch.m b/test/VFS/umbrella-mismatch.m
new file mode 100644
index 0000000000..c73129448c
--- /dev/null
+++ b/test/VFS/umbrella-mismatch.m
@@ -0,0 +1,8 @@
+// RUN: rm -rf %t
+// RUN: sed -e "s:INPUT_DIR:%S/Inputs:g" -e "s:OUT_DIR:%S/Inputs:g" %S/Inputs/vfsoverlay.yaml > %t.yaml
+// REQUIRES: shell
+
+// RUN: %clang_cc1 -Werror -fmodules -fmodules-cache-path=%t -ivfsoverlay %t.yaml -F %S/Inputs -fsyntax-only %s -verify
+// RUN: %clang_cc1 -Werror -fmodules -fmodules-cache-path=%t -F %S/Inputs -fsyntax-only %s -verify
+// expected-no-diagnostics
+@import Foo;