[llvm] TableGen: Fixed the string table definitions visibility. (PR #148946)

Slava Zakharin via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 15 12:54:46 PDT 2025


https://github.com/vzakhari created https://github.com/llvm/llvm-project/pull/148946

This fixes the buildbots issues reported in #148839.

>From 01fc35a3eab939ef7fb366c8288bf8f9e1fc2d64 Mon Sep 17 00:00:00 2001
From: Slava Zakharin <szakharin at nvidia.com>
Date: Tue, 15 Jul 2025 12:48:15 -0700
Subject: [PATCH] TableGen: Fixed the string table definitions visibility.

This fixes the buildbots issues reported in #148839.
---
 llvm/lib/TableGen/StringToOffsetTable.cpp | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/llvm/lib/TableGen/StringToOffsetTable.cpp b/llvm/lib/TableGen/StringToOffsetTable.cpp
index d6d2c2590389a..41f82caa12f82 100644
--- a/llvm/lib/TableGen/StringToOffsetTable.cpp
+++ b/llvm/lib/TableGen/StringToOffsetTable.cpp
@@ -83,10 +83,11 @@ void StringToOffsetTable::EmitStringTableDef(raw_ostream &OS,
 #pragma GCC diagnostic pop
 #endif
 
-{1}constexpr llvm::StringTable
+{1} llvm::StringTable
 {2}{0} = {0}Storage;
 )",
-                Name, ClassPrefix.empty() ? "static " : "", ClassPrefix);
+                Name, ClassPrefix.empty() ? "static constexpr" : "const",
+                ClassPrefix);
 }
 
 void StringToOffsetTable::EmitString(raw_ostream &O) const {



More information about the llvm-commits mailing list