Preserve ordering between -include and -include-pth.

llvm-svn: 67354
This commit is contained in:
Ted Kremenek 2009-03-20 00:40:03 +00:00
parent 07d8e3a500
commit eb996ab37d
1 changed files with 2 additions and 1 deletions

View File

@ -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;
}