- Notifications
You must be signed in to change notification settings - Fork14.5k
TableGen: Avoid emitting trailing whitespace in StringToOffsetTable#148840
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
TableGen: Avoid emitting trailing whitespace in StringToOffsetTable#148840
Uh oh!
There was an error while loading.Please reload this page.
Conversation
arsenm commentedJul 15, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
This stack of pull requests is managed byGraphite. Learn more aboutstacking. |
@llvm/pr-subscribers-tablegen Author: Matt Arsenault (arsenm) ChangesFull diff:https://github.com/llvm/llvm-project/pull/148840.diff 1 Files Affected:
diff --git a/llvm/lib/TableGen/StringToOffsetTable.cpp b/llvm/lib/TableGen/StringToOffsetTable.cppindex 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 |
@@ -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[] =)", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I think you'd want to add a whitespace before"{\n"
a few lines below then?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I don't think so, it looks right as is. Every entry ends up on its own line, though under-indented
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I'm referring to the >64k case, which now would print={
instead of= {
I think. But it doesn't particularly matter...
@@ -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[] =)", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I'm referring to the >64k case, which now would print={
instead of= {
I think. But it doesn't particularly matter...
arsenm commentedJul 15, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
0798c63
tob113ff2
Compare8e3742e
to74ed3cc
Compare8db92a7
intomainUh oh!
There was an error while loading.Please reload this page.
No description provided.