aboutsummaryrefslogtreecommitdiff
path: root/lib/Driver/InitHeaderSearch.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-09-26 21:18:42 +0000
committerChris Lattner <sabre@nondot.org>2008-09-26 21:18:42 +0000
commit0b9e736308af5397f558ffc8e780c438c2fdb563 (patch)
treedfa0ec391140c8df3be10f2ec3d7d3ec59b823e5 /lib/Driver/InitHeaderSearch.cpp
parent721818304ac462d8c6ce05eecd02884033db78f1 (diff)
clean up a bunch of fixme's I added, by moving
DirectoryLookup::DirType into SourceManager.h git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56692 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/InitHeaderSearch.cpp')
-rw-r--r--lib/Driver/InitHeaderSearch.cpp16
1 files changed, 6 insertions, 10 deletions
diff --git a/lib/Driver/InitHeaderSearch.cpp b/lib/Driver/InitHeaderSearch.cpp
index 5c23808b3b..3ebca8e175 100644
--- a/lib/Driver/InitHeaderSearch.cpp
+++ b/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<DirectoryLookup> &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<DirectoryLookup> &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;
}