[llvm] [llvm][Tablegen][llvm-tblgen] Added keyword #undef to llvm-tblgen and fixed a small b… (PR #69135)
Jon Roelofs via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 17 10:05:50 PDT 2023
================
@@ -834,6 +830,24 @@ tgtok::TokKind TGLexer::lexPreprocessor(
return tgtok::Error;
}
+ return LexToken();
+ } else if (Kind == tgtok::Undef) {
+ StringRef MacroName = prepLexMacroName();
+ if (MacroName.empty())
+ return ReturnError(TokStart, "Expected macor name after #undef");
----------------
jroelofs wrote:
```suggestion
return ReturnError(TokStart, "Expected macro name after #undef");
```
https://github.com/llvm/llvm-project/pull/69135
More information about the llvm-commits
mailing list