[lld] [llvm] [lld][COFF] Remove duplicate strtab entries (PR #141197)

James Henderson via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 16 23:44:46 PDT 2025


================
@@ -51,11 +53,16 @@ class StringTableBuilder {
   LLVM_ABI StringTableBuilder(Kind K, Align Alignment = Align(1));
   LLVM_ABI ~StringTableBuilder();
 
-  /// Add a string to the builder. Returns the position of S in the
-  /// table. The position will be changed if finalize is used.
-  /// Can only be used before the table is finalized.
-  LLVM_ABI size_t add(CachedHashStringRef S);
-  size_t add(StringRef S) { return add(CachedHashStringRef(S)); }
+  /// Add a string to the builder. Returns the position of S in the table. The
+  /// position will be changed if finalize is used. Can only be used before the
+  /// table is finalized. Priority is only useful with reordering. Strings with
+  /// same priority will be put together. Strings with higher priority are
----------------
jh7370 wrote:

```suggestion
  /// the same priority will be put together. Strings with higher priority are
```
Nit.

https://github.com/llvm/llvm-project/pull/141197


More information about the llvm-commits mailing list