From 2181b832807f205984f4760765536006ad930608 Mon Sep 17 00:00:00 2001 From: Ben Langmuir Date: Fri, 20 Feb 2015 21:46:39 +0000 Subject: Don't try to rebuild modules on umbrella header mismatch There are two issues here: 1) It's too late to rebuild at this point, because we won't go through removeModules and when we try to reload the new .pcm we'll get the old one instead. We might be able to call removeModules after an OutOfDate here, but I'm not yet confident that it is always safe to do so. 2) In practice, this check fails spuriously when the umbrella header appears to change because of a VFS change that means it maps to a different copy of the same file. Because of this, we just skip the check for now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@230064 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/VFS/Inputs/UsesFoo.framework/Headers/UsesFoo.h | 1 + test/VFS/Inputs/UsesFoo.framework/Modules/module.modulemap | 4 ++++ test/VFS/umbrella-mismatch.m | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 test/VFS/Inputs/UsesFoo.framework/Headers/UsesFoo.h create mode 100644 test/VFS/Inputs/UsesFoo.framework/Modules/module.modulemap (limited to 'test/VFS') diff --git a/test/VFS/Inputs/UsesFoo.framework/Headers/UsesFoo.h b/test/VFS/Inputs/UsesFoo.framework/Headers/UsesFoo.h new file mode 100644 index 0000000000..375d3ea2a0 --- /dev/null +++ b/test/VFS/Inputs/UsesFoo.framework/Headers/UsesFoo.h @@ -0,0 +1 @@ +@import Foo; diff --git a/test/VFS/Inputs/UsesFoo.framework/Modules/module.modulemap b/test/VFS/Inputs/UsesFoo.framework/Modules/module.modulemap new file mode 100644 index 0000000000..55be29e800 --- /dev/null +++ b/test/VFS/Inputs/UsesFoo.framework/Modules/module.modulemap @@ -0,0 +1,4 @@ +framework module UsesFoo { + umbrella header "UsesFoo.h" + export * +} diff --git a/test/VFS/umbrella-mismatch.m b/test/VFS/umbrella-mismatch.m index f3a4ab34e0..741b0e6930 100644 --- a/test/VFS/umbrella-mismatch.m +++ b/test/VFS/umbrella-mismatch.m @@ -4,4 +4,4 @@ // 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; +@import UsesFoo; -- cgit v1.2.1