From ec8c975214ceb9f59301e2abcd084fcdff06fbcd Mon Sep 17 00:00:00 2001 From: Ben Langmuir Date: Fri, 18 Apr 2014 22:07:31 +0000 Subject: Don't build modules with (submodules with) missing headers Unless they are in submodules that aren't available anyway, due to requirements not being met. Also, mark children as unavailable when the parent is. llvm-svn: 206664 --- clang/lib/Basic/Module.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'clang/lib/Basic/Module.cpp') diff --git a/clang/lib/Basic/Module.cpp b/clang/lib/Basic/Module.cpp index d5c02d8..6f29fae 100644 --- a/clang/lib/Basic/Module.cpp +++ b/clang/lib/Basic/Module.cpp @@ -160,6 +160,11 @@ void Module::addRequirement(StringRef Feature, bool RequiredState, if (hasFeature(Feature, LangOpts, Target) == RequiredState) return; + IsMissingRequirement = true; + markUnavailable(); +} + +void Module::markUnavailable() { if (!IsAvailable) return; -- cgit v1.1