Code in headers shouldn't be conditional on the build configuration.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@196656
91177308-0d34-0410-b5e6-
96231b3b80d8
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);
} // 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);