summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/InitHeaderSearch.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Frontend/InitHeaderSearch.cpp')
-rw-r--r--clang/lib/Frontend/InitHeaderSearch.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/clang/lib/Frontend/InitHeaderSearch.cpp b/clang/lib/Frontend/InitHeaderSearch.cpp
index 0b1a2e7a9a6..f94edc65b98 100644
--- a/clang/lib/Frontend/InitHeaderSearch.cpp
+++ b/clang/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);
OpenPOWER on IntegriCloud