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
|
There was a problem hiding this comment.
I think you'd want to add a whitespace before "{\n" a few lines below then?
There was a problem hiding this comment.
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.
I'm referring to the >64k case, which now would print ={ instead of = { I think. But it doesn't particularly matter...
There was a problem hiding this comment.
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.