[lld] [lld][macho] Rename test to fix spelling (PR #160938)

via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 26 13:17:14 PDT 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-lld

Author: Ellis Hoag (ellishg)

<details>
<summary>Changes</summary>

The test name had a typo from https://github.com/llvm/llvm-project/pull/140307. Fix it.

I realized cstring ordering is not supported when string deduplication is turned off. We could easily call `buildCStringPriorities()` in `CStringSection::finalizeContents()`, but I worry it might harm build performance since it creates multiple vectors and searches though maps. If users are not deduplicating strings, they probably won't care to order them, but it would be good to support this.

---
Full diff: https://github.com/llvm/llvm-project/pull/160938.diff


2 Files Affected:

- (modified) lld/MachO/SyntheticSections.cpp (+3) 
- (renamed) lld/test/MachO/order-file-cstring.s () 


``````````diff
diff --git a/lld/MachO/SyntheticSections.cpp b/lld/MachO/SyntheticSections.cpp
index 979a4ee6d8133..228b84db21c2a 100644
--- a/lld/MachO/SyntheticSections.cpp
+++ b/lld/MachO/SyntheticSections.cpp
@@ -1687,6 +1687,9 @@ void CStringSection::writeTo(uint8_t *buf) const {
 
 void CStringSection::finalizeContents() {
   uint64_t offset = 0;
+  // TODO: Call buildCStringPriorities() to support cstring ordering when
+  // deduplication is off, although this may negatively impact build
+  // performance.
   for (CStringInputSection *isec : inputs) {
     for (const auto &[i, piece] : llvm::enumerate(isec->pieces)) {
       if (!piece.live)
diff --git a/lld/test/MachO/ordre-file-cstring.s b/lld/test/MachO/order-file-cstring.s
similarity index 100%
rename from lld/test/MachO/ordre-file-cstring.s
rename to lld/test/MachO/order-file-cstring.s

``````````

</details>


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


More information about the llvm-commits mailing list