[lld] [lld][macho] Rename test to fix spelling (PR #160938)
Ellis Hoag via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 26 13:16:40 PDT 2025
https://github.com/ellishg created https://github.com/llvm/llvm-project/pull/160938
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.
>From daff66376e37c621e82a981cf536b34c4937db7c Mon Sep 17 00:00:00 2001
From: Ellis Hoag <ellishoag at meta.com>
Date: Fri, 26 Sep 2025 13:13:51 -0700
Subject: [PATCH] [lld][macho] Rename test to fix spelling
---
lld/MachO/SyntheticSections.cpp | 3 +++
lld/test/MachO/{ordre-file-cstring.s => order-file-cstring.s} | 0
2 files changed, 3 insertions(+)
rename lld/test/MachO/{ordre-file-cstring.s => order-file-cstring.s} (100%)
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
More information about the llvm-commits
mailing list