[lld-macho] Construct CFString literals by copying the ConcatInputSection
authorJez Ng <jezng@fb.com>
Wed, 7 Jul 2021 17:47:26 +0000 (13:47 -0400)
committerJez Ng <jezng@fb.com>
Fri, 17 Sep 2021 23:46:20 +0000 (19:46 -0400)
commit91ace9f06202c567f5600c59f62188db3f3c7147
treef85bcf49ea8510a470a0cdc3036ad3ea583d5275
parent3b14d80ad4af303c9f7df189b8b7eee528d0ec8d
[lld-macho] Construct CFString literals by copying the ConcatInputSection

... instead of constructing a new one each time. This allows us
to take advantage of {D105305}.

I didn't see a substantial difference when linking chromium_framework,
but this paves the way for reusing similar logic for splitting compact
unwind entries into sections. There are a lot more of those, so the
performance impact is significant.

Differential Revision: https://reviews.llvm.org/D109895
lld/MachO/InputFiles.cpp