aboutsummaryrefslogtreecommitdiff
path: root/lib/Frontend/ASTUnit.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Frontend/ASTUnit.cpp')
-rw-r--r--lib/Frontend/ASTUnit.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Frontend/ASTUnit.cpp b/lib/Frontend/ASTUnit.cpp
index 523b8d0a6c..4395246f49 100644
--- a/lib/Frontend/ASTUnit.cpp
+++ b/lib/Frontend/ASTUnit.cpp
@@ -850,6 +850,8 @@ ASTUnit::ComputePreamble(CompilerInvocation &Invocation,
// Remove this remapping. We've captured the buffer already.
M = PreprocessorOpts.eraseRemappedFile(M);
E = PreprocessorOpts.remapped_file_end();
+ if (M == E)
+ break;
}
}
}
@@ -875,6 +877,8 @@ ASTUnit::ComputePreamble(CompilerInvocation &Invocation,
// Remove this remapping. We've captured the buffer already.
M = PreprocessorOpts.eraseRemappedFile(M);
E = PreprocessorOpts.remapped_file_buffer_end();
+ if (M == E)
+ break;
}
}
}