summaryrefslogtreecommitdiff
path: root/lib/Lex/PPCaching.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2018-01-24 20:25:37 +0000
committerDimitry Andric <dim@FreeBSD.org>2018-01-24 20:25:37 +0000
commit520a89e9d38bb1c9cc2de3f875eae3ac69f9f08a (patch)
tree54fe8463a6692d6f8706ee98bffde249b43eed0c /lib/Lex/PPCaching.cpp
parentead8c8e4f12a52fe33a395d4dce984c89ab04a77 (diff)
Notes
Diffstat (limited to 'lib/Lex/PPCaching.cpp')
-rw-r--r--lib/Lex/PPCaching.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Lex/PPCaching.cpp b/lib/Lex/PPCaching.cpp
index f5e8cdc25d38..9758557d7b44 100644
--- a/lib/Lex/PPCaching.cpp
+++ b/lib/Lex/PPCaching.cpp
@@ -105,8 +105,10 @@ void Preprocessor::CachingLex(Token &Result) {
}
void Preprocessor::EnterCachingLexMode() {
- if (InCachingLexMode())
+ if (InCachingLexMode()) {
+ assert(CurLexerKind == CLK_CachingLexer && "Unexpected lexer kind");
return;
+ }
PushIncludeMacroStack();
CurLexerKind = CLK_CachingLexer;