diff options
Diffstat (limited to 'lld/wasm/InputChunks.cpp')
-rw-r--r-- | lld/wasm/InputChunks.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lld/wasm/InputChunks.cpp b/lld/wasm/InputChunks.cpp index ef3edb8b9ca..0cac19b3d4e 100644 --- a/lld/wasm/InputChunks.cpp +++ b/lld/wasm/InputChunks.cpp @@ -36,6 +36,13 @@ std::string lld::toString(const InputChunk *C) { return (toString(C->File) + ":(" + C->getName() + ")").str(); } +StringRef InputChunk::getComdatName() const { + uint32_t Index = getComdat(); + if (Index == UINT32_MAX) + return StringRef(); + return File->getWasmObj()->linkingData().Comdats[Index]; +} + void InputChunk::copyRelocations(const WasmSection &Section) { if (Section.Relocations.empty()) return; |