[llvm] TableGen: Avoid emitting trailing whitespace in StringToOffsetTable (PR #148840)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 15 07:25:06 PDT 2025


https://github.com/arsenm updated https://github.com/llvm/llvm-project/pull/148840

>From 74ed3cc4142312431fd9818ef3ff6f9c40ec38ac Mon Sep 17 00:00:00 2001
From: Matt Arsenault <Matthew.Arsenault at amd.com>
Date: Tue, 15 Jul 2025 21:12:57 +0900
Subject: [PATCH] TableGen: Avoid emitting trailing whitespace in
 StringToOffsetTable

---
 llvm/lib/TableGen/StringToOffsetTable.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/llvm/lib/TableGen/StringToOffsetTable.cpp b/llvm/lib/TableGen/StringToOffsetTable.cpp
index 9fb41485db745..d6d2c2590389a 100644
--- a/llvm/lib/TableGen/StringToOffsetTable.cpp
+++ b/llvm/lib/TableGen/StringToOffsetTable.cpp
@@ -38,7 +38,7 @@ void StringToOffsetTable::EmitStringTableDef(raw_ostream &OS,
 #pragma GCC diagnostic push
 #pragma GCC diagnostic ignored "-Woverlength-strings"
 #endif
-{} constexpr char {}{}Storage[] = )",
+{} constexpr char {}{}Storage[] =)",
                 ClassPrefix.empty() ? "static" : "", ClassPrefix, Name);
 
   // MSVC silently miscompiles string literals longer than 64k in some



More information about the llvm-commits mailing list