@@ -102,7 +102,7 @@ SMRange TGLexer::getLocRange() const {
102102}
103103
104104// / ReturnError - Set the error to the specified string at the specified
105- // / location. This is defined to always return tgtok::Error.
105+ // / location. This is defined to always return tgtok::Error.
106106tgtok::TokKind TGLexer::ReturnError (SMLoc Loc, const Twine &Msg) {
107107 PrintError (Loc, Msg);
108108 return tgtok::Error;
@@ -116,7 +116,7 @@ bool TGLexer::processEOF() {
116116 SMLoc ParentIncludeLoc = SrcMgr.getParentIncludeLoc (CurBuffer);
117117 if (ParentIncludeLoc != SMLoc ()) {
118118 // If prepExitInclude() detects a problem with the preprocessing
119- // control stack, it will return false. Pretend that we reached
119+ // control stack, it will return false. Pretend that we reached
120120 // the final EOF and stop lexing more tokens by returning false
121121 // to LexToken().
122122 if (!prepExitInclude (false ))
@@ -147,7 +147,7 @@ int TGLexer::getNextChar() {
147147
148148 case 0 : {
149149 // A NUL character in the stream is either the end of the current buffer or
150- // a spurious NUL in the file. Disambiguate that here.
150+ // a spurious NUL in the file. Disambiguate that here.
151151 if (CurPtr - 1 == CurBuf.end ()) {
152152 --CurPtr; // Arrange for another call to return EOF again.
153153 return EOF;
@@ -160,7 +160,7 @@ int TGLexer::getNextChar() {
160160 case ' \n ' :
161161 case ' \r ' :
162162 // Handle the newline character by ignoring it and incrementing the line
163- // count. However, be careful about 'dos style' files with \n\r in them.
163+ // count. However, be careful about 'dos style' files with \n\r in them.
164164 // Only treat a \n\r or \r\n as a single line.
165165 if ((*CurPtr == ' \n ' || (*CurPtr == ' \r ' )) &&
166166 *CurPtr != CurChar)
@@ -259,7 +259,7 @@ tgtok::TokKind TGLexer::LexToken(bool FileOrLineStart) {
259259 int NextChar = 0 ;
260260 if (isDigit (CurChar)) {
261261 // Allow identifiers to start with a number if it is followed by
262- // an identifier. This can happen with paste operations like
262+ // an identifier. This can happen with paste operations like
263263 // foo#8i.
264264 int i = 0 ;
265265 do {
@@ -422,7 +422,7 @@ tgtok::TokKind TGLexer::LexIdentifier() {
422422 return Kind;
423423}
424424
425- // / LexInclude - We just read the "include" token. Get the string token that
425+ // / LexInclude - We just read the "include" token. Get the string token that
426426// / comes next and enter the include.
427427bool TGLexer::LexInclude () {
428428 // The token after the include must be a string.
@@ -461,7 +461,7 @@ void TGLexer::SkipBCPLComment() {
461461 CurPtr = (EOLPos == StringRef::npos) ? CurBuf.end () : CurBuf.data () + EOLPos;
462462}
463463
464- // / SkipCComment - This skips C-style /**/ comments. The only difference from C
464+ // / SkipCComment - This skips C-style /**/ comments. The only difference from C
465465// / is that we allow nesting.
466466bool TGLexer::SkipCComment () {
467467 ++CurPtr; // skip the star.
@@ -554,8 +554,8 @@ tgtok::TokKind TGLexer::LexNumber() {
554554 return Base == 2 ? tgtok::BinaryIntVal : tgtok::IntVal;
555555}
556556
557- // / LexBracket - We just read '['. If this is a code block, return it,
558- // / otherwise return the bracket. Match: '[' and '[{ ( [^}]+ | }[^]] )* }]'
557+ // / LexBracket - We just read '['. If this is a code block, return it,
558+ // / otherwise return the bracket. Match: '[' and '[{ ( [^}]+ | }[^]] )* }]'
559559tgtok::TokKind TGLexer::LexBracket () {
560560 if (CurPtr[0 ] != ' {' )
561561 return tgtok::l_square;
@@ -687,7 +687,7 @@ tgtok::TokKind TGLexer::prepIsDirective() const {
687687 NextChar == ' \n ' ||
688688 // It looks like TableGen does not support '\r' as the actual
689689 // carriage return, e.g. getNextChar() treats a single '\r'
690- // as '\n'. So we do the same here.
690+ // as '\n'. So we do the same here.
691691 NextChar == ' \r ' )
692692 return Kind;
693693
@@ -700,7 +700,7 @@ tgtok::TokKind TGLexer::prepIsDirective() const {
700700 // #define/**/ AND #define//
701701 //
702702 // These cases will be reported as incorrect after calling
703- // prepLexMacroName(). We could have supported C-style comments
703+ // prepLexMacroName(). We could have supported C-style comments
704704 // after #ifdef/#define, but this would complicate the code
705705 // for little benefit.
706706 if (NextChar == ' /' ) {
@@ -733,7 +733,7 @@ void TGLexer::prepEatPreprocessorDirective(tgtok::TokKind Kind) {
733733
734734tgtok::TokKind TGLexer::lexPreprocessor (tgtok::TokKind Kind,
735735 bool ReturnNextLiveToken) {
736- // We must be looking at a preprocessing directive. Eat it!
736+ // We must be looking at a preprocessing directive. Eat it!
737737 prepEatPreprocessorDirective (Kind);
738738
739739 if (Kind == tgtok::Ifdef || Kind == tgtok::Ifndef) {
@@ -879,7 +879,7 @@ bool TGLexer::prepSkipRegion(bool MustNeverBeFalse) {
879879 tgtok::TokKind Kind = prepIsDirective ();
880880
881881 // If we did not find a preprocessing directive or it is #define,
882- // then just skip to the next line. We do not have to do anything
882+ // then just skip to the next line. We do not have to do anything
883883 // for #define in the line-skipping mode.
884884 if (Kind == tgtok::Error || Kind == tgtok::Define)
885885 continue ;
@@ -909,7 +909,7 @@ bool TGLexer::prepSkipRegion(bool MustNeverBeFalse) {
909909 } while (CurPtr != CurBuf.end ());
910910
911911 // We have reached the end of the file, but never left the lines-skipping
912- // mode. This means there is no matching #endif.
912+ // mode. This means there is no matching #endif.
913913 prepReportPreprocessorStackError ();
914914 return false ;
915915}
@@ -939,8 +939,8 @@ bool TGLexer::prepSkipLineBegin() {
939939 // Skip C-style comment.
940940 // Note that we do not care about skipping the C++-style comments.
941941 // If the line contains "//", it may not contain any processable
942- // preprocessing directive. Just return CurPtr pointing to
943- // the first '/' in this case. We also do not care about
942+ // preprocessing directive. Just return CurPtr pointing to
943+ // the first '/' in this case. We also do not care about
944944 // incorrect symbols after the first '/' - we are in lines-skipping
945945 // mode, so incorrect code is allowed to some extent.
946946
@@ -968,7 +968,7 @@ bool TGLexer::prepSkipLineBegin() {
968968 ++CurPtr;
969969 }
970970
971- // We have reached the end of the file. Return to the lines skipping
971+ // We have reached the end of the file. Return to the lines skipping
972972 // code, and allow it to handle the EOF as needed.
973973 return true ;
974974}
@@ -994,7 +994,7 @@ bool TGLexer::prepSkipDirectiveEnd() {
994994 SkipBCPLComment ();
995995 } else if (NextChar == ' *' ) {
996996 // When we are skipping C-style comment at the end of a preprocessing
997- // directive, we can skip several lines. If any meaningful TD token
997+ // directive, we can skip several lines. If any meaningful TD token
998998 // follows the end of the C-style comment on the same line, it will
999999 // be considered as an invalid usage of TD token.
10001000 // For example, we want to forbid usages like this one:
@@ -1003,7 +1003,7 @@ bool TGLexer::prepSkipDirectiveEnd() {
10031003 // #define MACRO /* This macro is used
10041004 // to ... */ class Class {}
10051005 // One can argue that this should be allowed, but it does not seem
1006- // to be worth of the complication. Moreover, this matches
1006+ // to be worth of the complication. Moreover, this matches
10071007 // the C preprocessor behavior.
10081008
10091009 // Set TokStart to the beginning of the comment to enable proper
0 commit comments