diff options
author | Alp Toker <alp@nuanti.com> | 2013-12-07 13:51:26 +0000 |
---|---|---|
committer | Alp Toker <alp@nuanti.com> | 2013-12-07 13:51:26 +0000 |
commit | 3ffab05f542fdee47b4c2bcb8be97f35a7e0ea6c (patch) | |
tree | 318d6e80be8cc7a835e46bf987c2ca70f6c48209 /clang/lib/AST/CommentLexer.cpp | |
parent | e10a9fc08de7947425b1ec1f1a4aae715203082e (diff) | |
download | bcm5719-llvm-3ffab05f542fdee47b4c2bcb8be97f35a7e0ea6c.tar.gz bcm5719-llvm-3ffab05f542fdee47b4c2bcb8be97f35a7e0ea6c.zip |
CommentLexer: eliminate an NDEBUG from the headers
Code in headers shouldn't be conditional on the build configuration.
llvm-svn: 196656
Diffstat (limited to 'clang/lib/AST/CommentLexer.cpp')
-rw-r--r-- | clang/lib/AST/CommentLexer.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/clang/lib/AST/CommentLexer.cpp b/clang/lib/AST/CommentLexer.cpp index 01ed3ce80a6..792a8320449 100644 --- a/clang/lib/AST/CommentLexer.cpp +++ b/clang/lib/AST/CommentLexer.cpp @@ -268,6 +268,19 @@ const char *findCCommentEnd(const char *BufferPtr, const char *BufferEnd) { } // unnamed namespace +void Lexer::formTokenWithChars(Token &Result, const char *TokEnd, + tok::TokenKind Kind) { + const unsigned TokLen = TokEnd - BufferPtr; + Result.setLocation(getSourceLocation(BufferPtr)); + Result.setKind(Kind); + Result.setLength(TokLen); +#ifndef NDEBUG + Result.TextPtr = "<UNSET>"; + Result.IntVal = 7; +#endif + BufferPtr = TokEnd; +} + void Lexer::lexCommentText(Token &T) { assert(CommentState == LCS_InsideBCPLComment || CommentState == LCS_InsideCComment); |