aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tools/clang-cc/CacheTokens.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/clang-cc/CacheTokens.cpp b/tools/clang-cc/CacheTokens.cpp
index 6e2a20d987..c417eb4902 100644
--- a/tools/clang-cc/CacheTokens.cpp
+++ b/tools/clang-cc/CacheTokens.cpp
@@ -475,8 +475,10 @@ PTHEntry PTHWriter::LexTokens(Lexer& L) {
// Get the next token.
L.LexFromRawLexer(Tok);
-
- assert(!Tok.isAtStartOfLine());
+
+ // If we see the start of line, then we had a null directive "#".
+ if (Tok.isAtStartOfLine())
+ goto NextToken;
// Did we see 'include'/'import'/'include_next'?
if (Tok.isNot(tok::identifier)) {