diff options
author | Ted Kremenek <kremenek@apple.com> | 2009-03-20 00:40:03 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2009-03-20 00:40:03 +0000 |
commit | c53b60adefc7fc31cd2dcec2810d1b4525945900 (patch) | |
tree | e9cc66bf2bd683f065efba493bcc48b7713caf78 /Driver/clang.cpp | |
parent | a6457963cf7ffe71498c408dd590d9d1acb9513c (diff) |
Preserve ordering between -include and -include-pth.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67354 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'Driver/clang.cpp')
-rw-r--r-- | Driver/clang.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Driver/clang.cpp b/Driver/clang.cpp index 31aedbfc97..1fd54d4b9e 100644 --- a/Driver/clang.cpp +++ b/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; } |