[llvm] [NFC][TableGen] Refactor preprocessor directive handling (PR #102967)
Rahul Joshi via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 12 16:57:44 PDT 2024
================
@@ -32,18 +32,19 @@ using namespace llvm;
namespace {
// A list of supported preprocessing directives with their
// internal token kinds and names.
-struct {
+struct PreprocessorDir {
tgtok::TokKind Kind;
- const char *Word;
-} PreprocessorDirs[] = {
- { tgtok::Ifdef, "ifdef" },
- { tgtok::Ifndef, "ifndef" },
- { tgtok::Else, "else" },
- { tgtok::Endif, "endif" },
- { tgtok::Define, "define" }
+ StringRef Word;
};
} // end anonymous namespace
+static constexpr PreprocessorDir PreprocessorDirs[] = {
----------------
jurahul wrote:
Done.
https://github.com/llvm/llvm-project/pull/102967
More information about the llvm-commits
mailing list