-
Notifications
You must be signed in to change notification settings - Fork 14.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 our terms of service and privacy 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
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
@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.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
|
@@ -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...
0798c63
to
b113ff2
Compare
8e3742e
to
74ed3cc
Compare
No description provided.