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 | |
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
-rw-r--r-- | clang/include/clang/AST/CommentLexer.h | 12 | ||||
-rw-r--r-- | clang/lib/AST/CommentLexer.cpp | 13 |
2 files changed, 14 insertions, 11 deletions
diff --git a/clang/include/clang/AST/CommentLexer.h b/clang/include/clang/AST/CommentLexer.h index f152c778c9a..418fe0fbb6d 100644 --- a/clang/include/clang/AST/CommentLexer.h +++ b/clang/include/clang/AST/CommentLexer.h @@ -293,17 +293,7 @@ private: StringRef resolveHTMLHexCharacterReference(StringRef Name) const; void 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; - } + tok::TokenKind Kind); void formTextToken(Token &Result, const char *TokEnd) { StringRef Text(BufferPtr, TokEnd - BufferPtr); 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); |