Fix a regression introduced by r131955 which broke #include_next in subtle situations

because the Angled directories and the System directories were not being uniqued 
together, breaking #include_next.  I'll see about a testcase, but it will be insane.

llvm-svn: 133212
This commit is contained in:
Chris Lattner 2011-06-16 22:58:10 +00:00
parent 0c64f4b27e
commit 705c5c8d22
1 changed files with 4 additions and 1 deletions

View File

@ -1050,7 +1050,10 @@ void InitHeaderSearch::Realize(const LangOptions &Lang) {
SearchList.push_back(it->second);
}
RemoveDuplicates(SearchList, NumAngled, Verbose);
// Remove duplicates across both the Angled and System directories. GCC does
// this and failing to remove duplicates across these two groups breaks
// #include_next.
RemoveDuplicates(SearchList, NumQuoted, Verbose);
bool DontSearchCurDir = false; // TODO: set to true if -I- is set?
Headers.SetSearchPaths(SearchList, NumQuoted, NumAngled, DontSearchCurDir);