From b03dc76499b82237af88f2654d7749ee711fb008 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 26 Sep 2008 21:18:42 +0000 Subject: clean up a bunch of fixme's I added, by moving DirectoryLookup::DirType into SourceManager.h llvm-svn: 56692 --- clang/lib/Driver/InitHeaderSearch.cpp | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'clang/lib/Driver/InitHeaderSearch.cpp') diff --git a/clang/lib/Driver/InitHeaderSearch.cpp b/clang/lib/Driver/InitHeaderSearch.cpp index 5c23808b3ba..3ebca8e175b 100644 --- a/clang/lib/Driver/InitHeaderSearch.cpp +++ b/clang/lib/Driver/InitHeaderSearch.cpp @@ -43,13 +43,13 @@ void InitHeaderSearch::AddPath(const std::string &Path, IncludeDirGroup Group, MappedPath.append(Path.begin(), Path.end()); // Compute the DirectoryLookup type. - DirectoryLookup::DirType Type; + SrcMgr::Characteristic_t Type; if (Group == Quoted || Group == Angled) - Type = DirectoryLookup::NormalHeaderDir; + Type = SrcMgr::C_User; else if (isCXXAware) - Type = DirectoryLookup::SystemHeaderDir; + Type = SrcMgr::C_System; else - Type = DirectoryLookup::ExternCSystemHeaderDir; + Type = SrcMgr::C_ExternCSystem; // If the directory exists, add it. @@ -267,10 +267,7 @@ static void RemoveDuplicates(std::vector &SearchList, // // Since dupes of system dirs are rare, just rescan to find the original // that we're nuking instead of using a DenseMap. - if (SearchList[i].getDirCharacteristic() == - DirectoryLookup::SystemHeaderDir || - SearchList[i].getDirCharacteristic() == - DirectoryLookup::ExternCSystemHeaderDir) { + if (SearchList[i].getDirCharacteristic() != SrcMgr::C_User) { // Find the dir that this is the same of. unsigned FirstDir; for (FirstDir = 0; ; ++FirstDir) { @@ -281,8 +278,7 @@ static void RemoveDuplicates(std::vector &SearchList, // If the first dir in the search path is a non-system dir, zap it // instead of the system one. - if (SearchList[FirstDir].getDirCharacteristic() == - DirectoryLookup::NormalHeaderDir) + if (SearchList[FirstDir].getDirCharacteristic() == SrcMgr::C_User) DirToRemove = FirstDir; } -- cgit v1.2.3