[llvm] [TableGen] Minor cleanup in `StringToOffsetTable` (PR #147712)
Rahul Joshi via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 9 11:52:03 PDT 2025
================
@@ -9,32 +9,37 @@
#include "llvm/TableGen/StringToOffsetTable.h"
#include "llvm/Support/FormatVariadic.h"
#include "llvm/Support/raw_ostream.h"
+#include "llvm/TableGen/Error.h"
#include "llvm/TableGen/Main.h"
using namespace llvm;
-unsigned StringToOffsetTable::GetOrAddStringOffset(StringRef Str,
- bool appendZero) {
+unsigned StringToOffsetTable::GetOrAddStringOffset(StringRef Str) {
auto [II, Inserted] = StringOffset.insert({Str, size()});
if (Inserted) {
// Add the string to the aggregate if this is the first time found.
AggregateString.append(Str.begin(), Str.end());
- if (appendZero)
+ if (AppendZero)
AggregateString += '\0';
}
return II->second;
}
-void StringToOffsetTable::EmitStringTableDef(raw_ostream &OS, const Twine &Name,
- const Twine &Indent) const {
----------------
jurahul wrote:
Right, they will need to remove it. Note that this creates a top-level global variable, so no indentation should be necessary.
https://github.com/llvm/llvm-project/pull/147712
More information about the llvm-commits
mailing list