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

via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 15 12:55:21 PDT 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-tablegen

Author: Slava Zakharin (vzakhari)

<details>
<summary>Changes</summary>

This fixes the buildbots issues reported in #<!-- -->148839.

---
Full diff: https://github.com/llvm/llvm-project/pull/148946.diff


1 Files Affected:

- (modified) llvm/lib/TableGen/StringToOffsetTable.cpp (+3-2) 


``````````diff
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 {

``````````

</details>


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


More information about the llvm-commits mailing list