Index: lld/trunk/wasm/InputChunks.h =================================================================== --- lld/trunk/wasm/InputChunks.h +++ lld/trunk/wasm/InputChunks.h @@ -51,8 +51,10 @@ uint32_t getOutputOffset() const { return OutputOffset; } ArrayRef getRelocations() const { return Relocations; } + StringRef getFileName() const { return File->getName(); } virtual StringRef getComdat() const = 0; + virtual StringRef getName() const = 0; bool Discarded = false; std::vector OutRelocations; @@ -99,7 +101,7 @@ uint32_t getAlignment() const { return Segment.Data.Alignment; } uint32_t startVA() const { return Segment.Data.Offset.Value.Int32; } uint32_t endVA() const { return startVA() + getSize(); } - StringRef getName() const { return Segment.Data.Name; } + StringRef getName() const override { return Segment.Data.Name; } StringRef getComdat() const override { return Segment.Data.Comdat; } int32_t OutputSegmentOffset = 0; @@ -126,7 +128,7 @@ return C->kind() == InputChunk::Function; } - virtual StringRef getName() const { return Function->Name; } + StringRef getName() const override { return Function->Name; } StringRef getComdat() const override { return Function->Comdat; } uint32_t getOutputIndex() const { return OutputIndex.getValue(); } bool hasOutputIndex() const { return OutputIndex.hasValue(); } Index: lld/trunk/wasm/InputChunks.cpp =================================================================== --- lld/trunk/wasm/InputChunks.cpp +++ lld/trunk/wasm/InputChunks.cpp @@ -113,13 +113,13 @@ } void InputFunction::setOutputIndex(uint32_t Index) { - DEBUG(dbgs() << "InputFunction::setOutputIndex: " << Index << "\n"); + DEBUG(dbgs() << "InputFunction::setOutputIndex: " << getName() << " -> " << Index << "\n"); assert(!hasOutputIndex()); OutputIndex = Index; } void InputFunction::setTableIndex(uint32_t Index) { - DEBUG(dbgs() << "InputFunction::setTableIndex " << Index << "\n"); + DEBUG(dbgs() << "InputFunction::setTableIndex: " << getName() << " -> " << Index << "\n"); assert(!hasTableIndex()); TableIndex = Index; }