This is an archive of the discontinued LLVM Phabricator instance.

[lld][WebAssembly][NFC] Move getOutputSegmentName to InputChunk methods
AbandonedPublic

Authored by kateinoigakukun on Jun 3 2022, 10:28 AM.

Details

Reviewers
sbc100
Summary

This patch is extracted from the https://reviews.llvm.org/D126950.
It renames getOutputDataSegmentName static function to getOutputSegmentName, and also place it in InputChunk to reuse it while GCing sections.

Diff Detail

Event Timeline

Herald added a project: Restricted Project. · View Herald TranscriptJun 3 2022, 10:28 AM
kateinoigakukun requested review of this revision.Jun 3 2022, 10:28 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 3 2022, 10:28 AM
sbc100 added inline comments.Jun 3 2022, 10:41 AM
lld/wasm/InputChunks.cpp
531

Actually, looking at this code and looking at how ELF does this.. I think you can just use getName in the other patch and maybe this patch is not actually needed?

None of these combined segments return true for isValidCIdentifier so I think you can just to what ELF in its MakeLive.cpp and use the intput section name.

kateinoigakukun abandoned this revision.Jun 3 2022, 10:55 AM
kateinoigakukun added inline comments.
lld/wasm/InputChunks.cpp
531

Ah, it makes sense to me.

sbc100 added a comment.Jun 6 2022, 1:58 PM

I guess we can abandon this?