Index: lld/COFF/Driver.cpp =================================================================== --- lld/COFF/Driver.cpp +++ lld/COFF/Driver.cpp @@ -1757,8 +1757,8 @@ config->mapFile = getMapFile(args, OPT_map, OPT_map_file); if (config->lldmapFile != "" && config->lldmapFile == config->mapFile) { - warn("/lldmap and /map have the same output file '" + config->mapFile + - "'.\n>>> ignoring /lldmap"); + warn("/lldmap and /map have same output '" + config->mapFile + + "', ignoring /lldmap"); config->lldmapFile.clear(); } Index: lld/COFF/DriverUtils.cpp =================================================================== --- lld/COFF/DriverUtils.cpp +++ lld/COFF/DriverUtils.cpp @@ -705,9 +705,9 @@ std::string sourceStr = source ? toString(source) : "cmd-line"; std::string existingStr = existing.second ? toString(existing.second) : "cmd-line"; - fatal("/failifmismatch: mismatch detected for '" + k + "':\n>>> " + - existingStr + " has value " + existing.first + "\n>>> " + sourceStr + - " has value " + v); + fatal("/failifmismatch: mismatch detected for '" + k + "':\n" + ">>> " + existingStr + " has value " + existing.first + "\n" + ">>> " + sourceStr + " has value " + v); } config->mustMatch[k] = {v, source}; } Index: lld/ELF/EhFrame.cpp =================================================================== --- lld/ELF/EhFrame.cpp +++ lld/ELF/EhFrame.cpp @@ -42,7 +42,8 @@ private: template void failOn(const P *loc, const Twine &msg) { - fatal("corrupted .eh_frame: " + msg + "\n>>> defined in " + + fatal("corrupted .eh_frame: " + msg + "\n" + ">>> defined in " + isec->getObjMsg((const uint8_t *)loc - isec->data().data())); } Index: lld/ELF/InputSection.cpp =================================================================== --- lld/ELF/InputSection.cpp +++ lld/ELF/InputSection.cpp @@ -456,8 +456,8 @@ Elf_Shdr_Impl sec = CHECK(file->getObj().sections(), file)[secIdx]; warn("relocation refers to a discarded section: " + - CHECK(file->getObj().getSectionName(sec), file) + - "\n>>> referenced by " + getObjMsg(p->r_offset)); + CHECK(file->getObj().getSectionName(sec), file) + "\n" + ">>> referenced by " + getObjMsg(p->r_offset)); } p->setSymbolAndType(0, 0, false); continue; Index: lld/ELF/OutputSections.cpp =================================================================== --- lld/ELF/OutputSections.cpp +++ lld/ELF/OutputSections.cpp @@ -121,16 +121,16 @@ } else { // Otherwise, check if new type or flags are compatible with existing ones. if ((flags ^ isec->flags) & SHF_TLS) - error("incompatible section flags for " + name + "\n>>> " + toString(isec) + - ": 0x" + utohexstr(isec->flags) + "\n>>> output section " + name + - ": 0x" + utohexstr(flags)); + error("incompatible section flags for " + name + "\n" + ">>> " + toString(isec) + ": 0x" + utohexstr(isec->flags) + "\n" + ">>> output section " + name + ": 0x" + utohexstr(flags)); if (type != isec->type) { if (!canMergeToProgbits(type) || !canMergeToProgbits(isec->type)) - error("section type mismatch for " + isec->name + "\n>>> " + - toString(isec) + ": " + - getELFSectionTypeName(config->emachine, isec->type) + - "\n>>> output section " + name + ": " + + error("section type mismatch for " + isec->name + "\n" + ">>> " + toString(isec) + ": " + + getELFSectionTypeName(config->emachine, isec->type) + "\n" + ">>> output section " + name + ": " + getELFSectionTypeName(config->emachine, type)); type = SHT_PROGBITS; } Index: lld/ELF/Symbols.h =================================================================== --- lld/ELF/Symbols.h +++ lld/ELF/Symbols.h @@ -541,8 +541,9 @@ if (symbolKind != PlaceholderKind && !newSym.isLazy() && (type == STT_TLS) != (newSym.type == STT_TLS) && type != llvm::ELF::STT_NOTYPE) - error("TLS attribute mismatch: " + toString(*this) + "\n>>> defined in " + - toString(newSym.file) + "\n>>> defined in " + toString(file)); + error("TLS attribute mismatch: " + toString(*this) + "\n" + ">>> defined in " + toString(newSym.file) + "\n" + ">>> defined in " + toString(file)); Symbol old = *this; memcpy(this, &newSym, newSym.getSymbolSize()); Index: lld/ELF/Symbols.cpp =================================================================== --- lld/ELF/Symbols.cpp +++ lld/ELF/Symbols.cpp @@ -621,8 +621,9 @@ Defined *d = cast(sym); if (!d->section || !errSec) { - error("duplicate symbol: " + toString(*sym) + "\n>>> defined in " + - toString(sym->file) + "\n>>> defined in " + toString(newFile)); + error("duplicate symbol: " + toString(*sym) + "\n" + ">>> defined in " + toString(sym->file) + "\n" + ">>> defined in " + toString(newFile)); return; } Index: lld/MachO/Driver.cpp =================================================================== --- lld/MachO/Driver.cpp +++ lld/MachO/Driver.cpp @@ -1135,8 +1135,8 @@ // via -u flag twice. for (const Symbol *undefined : config->explicitUndefineds) { if (isa(undefined)) { - error("undefined symbol: " + toString(*undefined) + - "\n>>> referenced by flag -u " + toString(*undefined)); + error("undefined symbol: " + toString(*undefined) + "\n" + ">>> referenced by flag -u " + toString(*undefined)); return false; } } @@ -1147,8 +1147,8 @@ if (const Symbol *sym = symtab->find(cachedName)) if (isa(sym)) continue; - error("undefined symbol " + cachedName.val() + - "\n>>> referenced from option -exported_symbol(s_list)"); + error("undefined symbol " + cachedName.val() + "\n" + ">>> referenced from option -exported_symbol(s_list)"); } if (target->wordSize == 8) Index: lld/MachO/SymbolTable.cpp =================================================================== --- lld/MachO/SymbolTable.cpp +++ lld/MachO/SymbolTable.cpp @@ -61,9 +61,9 @@ return defined; } if (!defined->isWeakDef()) - error("duplicate symbol: " + name + "\n>>> defined in " + - toString(defined->getFile()) + "\n>>> defined in " + - toString(file)); + error("duplicate symbol: " + name + "\n" + ">>> defined in " + toString(defined->getFile()) + "\n" + ">>> defined in " + toString(file)); } else if (auto *dysym = dyn_cast(s)) { overridesWeakDef = !isWeakDef && dysym->isWeakDef(); } Index: lld/MachO/SyntheticSections.cpp =================================================================== --- lld/MachO/SyntheticSections.cpp +++ lld/MachO/SyntheticSections.cpp @@ -580,8 +580,8 @@ static void validateExportSymbol(const Defined *defined) { StringRef symbolName = defined->getName(); if (defined->privateExtern && config->exportedSymbols.match(symbolName)) - error("cannot export hidden symbol " + symbolName + "\n>>> defined in " + - toString(defined->getFile())); + error("cannot export hidden symbol " + symbolName + "\n" + ">>> defined in " + toString(defined->getFile())); } static bool shouldExportSymbol(const Defined *defined) {