make PTH not crash on a null directive (# on its own line)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69523 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/tools/clang-cc/CacheTokens.cpp b/tools/clang-cc/CacheTokens.cpp
index 6e2a20d..c417eb4 100644
--- a/tools/clang-cc/CacheTokens.cpp
+++ b/tools/clang-cc/CacheTokens.cpp
@@ -475,8 +475,10 @@
// 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)) {