summaryrefslogtreecommitdiffstats
path: root/clang/Driver/clang.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/Driver/clang.cpp')
-rw-r--r--clang/Driver/clang.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/Driver/clang.cpp b/clang/Driver/clang.cpp
index 31aedbfc97f..1fd54d4b9ee 100644
--- a/clang/Driver/clang.cpp
+++ b/clang/Driver/clang.cpp
@@ -934,7 +934,8 @@ static bool InitializePreprocessor(Preprocessor &PP,
// Add implicit #includes from -include and -include-pth.
bool handledPTH = ImplicitIncludePTH.empty();
for (unsigned i = 0, e = ImplicitIncludes.size(); i != e; ++i) {
- if (!handledPTH) {
+ if (!handledPTH &&
+ ImplicitIncludePTH.getPosition() < ImplicitIncludes.getPosition(i)) {
AddImplicitIncludePTH(PredefineBuffer, PP);
handledPTH = true;
}
OpenPOWER on IntegriCloud