Index: lld/wasm/OutputSections.cpp =================================================================== --- lld/wasm/OutputSections.cpp +++ lld/wasm/OutputSections.cpp @@ -55,11 +55,11 @@ } } -std::string lld::toString(const OutputSection &Section) { - std::string rtn = Section.getSectionName(); - if (!Section.Name.empty()) - rtn += "(" + Section.Name + ")"; - return rtn; +// Returns a string, e.g. "FUNCTION(.text)". +std::string lld::toString(const OutputSection &Sec) { + if (!Sec.Name.empty()) + return Sec.getSectionName() + "(" + Sec.Name + ")"; + return Sec.getSectionName(); } std::string OutputSection::getSectionName() const {