aboutsummaryrefslogtreecommitdiff
path: root/lib/Frontend
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2011-06-16 22:58:10 +0000
committerChris Lattner <sabre@nondot.org>2011-06-16 22:58:10 +0000
commit1d7f12b83340610f76a73d21cac391e6feced7aa (patch)
tree9c5438d5cf2ebd4afa2c35bd641475e0f0f6bee2 /lib/Frontend
parentebb6164bebf2b1e4f439433e751710b506918f62 (diff)
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133212 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend')
-rw-r--r--lib/Frontend/InitHeaderSearch.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Frontend/InitHeaderSearch.cpp b/lib/Frontend/InitHeaderSearch.cpp
index 0b1a2e7a9a..f94edc65b9 100644
--- a/lib/Frontend/InitHeaderSearch.cpp
+++ b/lib/Frontend/InitHeaderSearch.cpp
@@ -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);