Tweak the module auto-import heuristics a bit

llvm-svn: 139887
This commit is contained in:
Douglas Gregor 2011-09-16 00:22:46 +00:00
parent b1feced676
commit 88b4ddfa91
1 changed files with 2 additions and 1 deletions

View File

@ -289,7 +289,8 @@ const FileEntry *DirectoryLookup::DoFrameworkLookup(
/// Determine whether this is the module we're building or not.
bool AutomaticImport = SuggestedModule &&
(BuildingModule != StringRef(Filename.begin(), SlashPos));
(BuildingModule != StringRef(Filename.begin(), SlashPos)) &&
!Filename.substr(SlashPos + 1).startswith("..");
FrameworkName.append(Filename.begin()+SlashPos+1, Filename.end());
if (const FileEntry *FE = FileMgr.getFile(FrameworkName.str(),