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 | eb996ab37d5f0bfa4a0c45d8dfd5ab7de0542aab (patch) | |
| tree | 27199df3463cac630d231e39b101767302d9fee0 | |
| parent | 07d8e3a500477fef5164f928b6b9cec45580ccef (diff) | |
| download | bcm5719-llvm-eb996ab37d5f0bfa4a0c45d8dfd5ab7de0542aab.tar.gz bcm5719-llvm-eb996ab37d5f0bfa4a0c45d8dfd5ab7de0542aab.zip | |
Preserve ordering between -include and -include-pth.
llvm-svn: 67354
| -rw-r--r-- | clang/Driver/clang.cpp | 3 |
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; } |

