[llvm] b68df87 - [TableGen] Fix build failure by using int type for NextChar (#103000)

via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 12 21:47:33 PDT 2024


Author: Rahul Joshi
Date: 2024-08-13T07:47:30+03:00
New Revision: b68df879c64ac9bb17ce6cc09d5ad86e803a3211

URL: https://github.com/llvm/llvm-project/commit/b68df879c64ac9bb17ce6cc09d5ad86e803a3211
DIFF: https://github.com/llvm/llvm-project/commit/b68df879c64ac9bb17ce6cc09d5ad86e803a3211.diff

LOG: [TableGen] Fix build failure by using int type for NextChar (#103000)

Fixes an issue in https://github.com/llvm/llvm-project/pull/102967, 
which inddvertently changed the type of `NextChar` from int to char,
causing ppc64le build failures.

Added: 
    

Modified: 
    llvm/lib/TableGen/TGLexer.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/TableGen/TGLexer.cpp b/llvm/lib/TableGen/TGLexer.cpp
index 4b4344dd526fb..0554f0cf57883 100644
--- a/llvm/lib/TableGen/TGLexer.cpp
+++ b/llvm/lib/TableGen/TGLexer.cpp
@@ -644,7 +644,7 @@ tgtok::TokKind TGLexer::prepIsDirective() const {
   for (const auto [Kind, Word] : PreprocessorDirs) {
     if (StringRef(CurPtr, Word.size()) != Word)
       continue;
-    char NextChar = peekNextChar(Word.size());
+    int NextChar = peekNextChar(Word.size());
 
     // Check for whitespace after the directive. If there is no whitespace,
     // then we do not recognize it as a preprocessing directive.


        


More information about the llvm-commits mailing list