]> granicus.if.org Git - clang/commitdiff
Don't infer a submodule for a framework's private header, at least for now.
authorDouglas Gregor <dgregor@apple.com>
Fri, 13 Jan 2012 16:54:27 +0000 (16:54 +0000)
committerDouglas Gregor <dgregor@apple.com>
Fri, 13 Jan 2012 16:54:27 +0000 (16:54 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148117 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Lex/ModuleMap.cpp
test/Modules/auto-module-import.m

index 55fa50809a1cf7d635e1a451d2885cb29c71c68f..745ebc4d8b693b5df4d799a3e9d875a9496800ed 100644 (file)
@@ -341,20 +341,7 @@ ModuleMap::inferFrameworkModule(StringRef ModuleName,
                            Result);
     }
   }
-  
-  // Look for private headers.
-  llvm::SmallString<128> PrivateHeadersDirName(FrameworkDir->getName());
-  llvm::sys::path::append(PrivateHeadersDirName, "PrivateHeaders");
-  if (const DirectoryEntry *Dir = FileMgr.getDirectory(PrivateHeadersDirName)) {
-    Module *Private = findOrCreateModule("Private", Result, 
-                                         /*IsFramework=*/false, 
-                                         /*IsExplicit=*/true).first;
-    setUmbrellaDir(Private, Dir);
-    Private->InferSubmodules = true;
-    Private->InferExplicitSubmodules = true;
-    Private->InferExportWildcard = true;
-  }
-  
+
   return Result;
 }
 
index 429501c4bdb3142991b63bf57cfe8dc6fbac159f..fbd0a541b608c788c0b923374577823e28d21c70 100644 (file)
@@ -54,7 +54,7 @@ void testModuleSubFrameworkAgain() {
 
 int getDependsOnModulePrivate() { return depends_on_module_private; }
 
-#include <Module/ModulePrivate.h> // expected-warning{{treating #include as an import of module 'Module.Private.ModulePrivate'}}
+#include <Module/ModulePrivate.h> // includes the header
 
 int getModulePrivate() { return module_private; }