]> granicus.if.org Git - clang/commitdiff
Fixed problem with exclude header. The exclude header argument needs to be relative...
authorJohn Thompson <John.Thompson.JTSoftware@gmail.com>
Wed, 16 Apr 2014 00:07:06 +0000 (00:07 +0000)
committerJohn Thompson <John.Thompson.JTSoftware@gmail.com>
Wed, 16 Apr 2014 00:07:06 +0000 (00:07 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@206342 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Lex/ModuleMap.cpp
test/Modules/Inputs/exclude-header/module.map

index 810fcf05472a1a3136ee170e2c5e865567872192..3381144192c5fe6624329fa1758aedc613056bb4 100644 (file)
@@ -1006,8 +1006,6 @@ namespace clang {
     void parseConflict();
     void parseInferredModuleDecl(bool Framework, bool Explicit);
     bool parseOptionalAttributes(Attributes &Attrs);
-
-    const DirectoryEntry *getOverriddenHeaderSearchDir();
     
   public:
     explicit ModuleMapParser(Lexer &L, SourceManager &SourceMgr, 
@@ -1628,10 +1626,6 @@ void ModuleMapParser::parseHeaderDecl(MMToken::TokenKind LeadingToken,
   if (llvm::sys::path::is_absolute(Header.FileName)) {
     PathName = Header.FileName;
     File = SourceMgr.getFileManager().getFile(PathName);
-  } else if (const DirectoryEntry *Dir = getOverriddenHeaderSearchDir()) {
-    PathName = Dir->getName();
-    llvm::sys::path::append(PathName, Header.FileName);
-    File = SourceMgr.getFileManager().getFile(PathName);
   } else {
     // Search for the header file within the search directory.
     PathName = Directory->getName();
@@ -2184,22 +2178,6 @@ bool ModuleMapParser::parseOptionalAttributes(Attributes &Attrs) {
   return HadError;
 }
 
-/// \brief If there is a specific header search directory due the presence
-/// of an umbrella directory, retrieve that directory. Otherwise, returns null.
-const DirectoryEntry *ModuleMapParser::getOverriddenHeaderSearchDir() {
-  for (Module *Mod = ActiveModule; Mod; Mod = Mod->Parent) {
-    // If we have an umbrella directory, use that.
-    if (Mod->hasUmbrellaDir())
-      return Mod->getUmbrellaDir();
-    
-    // If we have a framework directory, stop looking.
-    if (Mod->IsFramework)
-      return 0;
-  }
-  
-  return 0;
-}
-
 /// \brief Parse a module map file.
 ///
 ///   module-map-file:
index 2aa1024458b4e9f6db0254fe3386a0aae780da14..2563ef9dc9cd3e169ae6f50a4773f0ef88a31a1a 100644 (file)
@@ -1,3 +1,3 @@
-module x { umbrella "x" exclude header "x/bad.h" exclude header "y/b.h" module * {} }
+module x { umbrella "x" exclude header "x/bad.h" module * {} }
 module y { umbrella "y" module * {} }
 module bad { header "x/bad.h" }