Index: ELF/Driver.cpp =================================================================== --- ELF/Driver.cpp +++ ELF/Driver.cpp @@ -92,7 +92,7 @@ using namespace llvm::sys::fs; log(Path); auto MBOrErr = MemoryBuffer::getFile(Path); - if (error(MBOrErr, "cannot open " + Path)) + if (error(MBOrErr, "Cannot open " + Path)) return; std::unique_ptr &MB = *MBOrErr; MemoryBufferRef MBRef = MB->getMemBufferRef(); @@ -313,7 +313,7 @@ } if (Files.empty() && !HasError) - error("no input files."); + error("No input files"); } template void LinkerDriver::link(opt::InputArgList &Args) { Index: ELF/DriverUtils.cpp =================================================================== --- ELF/DriverUtils.cpp +++ ELF/DriverUtils.cpp @@ -67,15 +67,15 @@ // Parse options and then do error checking. opt::InputArgList Args = Table.ParseArgs(Vec, MissingIndex, MissingCount); if (MissingCount) - error(Twine("missing arg value for \"") + Args.getArgString(MissingIndex) + + error(Twine("Missing arg value for \"") + Args.getArgString(MissingIndex) + "\", expected " + Twine(MissingCount) + (MissingCount == 1 ? " argument.\n" : " arguments")); iterator_range Unknowns = Args.filtered(OPT_UNKNOWN); for (auto *Arg : Unknowns) - warning("warning: unknown argument: " + Arg->getSpelling()); + warning("Warning: unknown argument: " + Arg->getSpelling()); if (Unknowns.begin() != Unknowns.end()) - error("unknown argument(s) found"); + error("Unknown argument(s) found"); return Args; } Index: ELF/InputFiles.cpp =================================================================== --- ELF/InputFiles.cpp +++ ELF/InputFiles.cpp @@ -302,7 +302,7 @@ switch (Sym->getBinding()) { default: - fatal("unexpected binding"); + fatal("Unexpected binding"); case STB_GLOBAL: case STB_WEAK: case STB_GNU_UNIQUE: { Index: ELF/LinkerScript.cpp =================================================================== --- ELF/LinkerScript.cpp +++ ELF/LinkerScript.cpp @@ -166,7 +166,7 @@ if (Handler Fn = Cmd.lookup(Tok)) (this->*Fn)(); else - setError("unknown directive: " + Tok); + setError("Unknown directive: " + Tok); } } @@ -190,7 +190,7 @@ if (S.startswith("\"")) { size_t E = S.find("\"", 1); if (E == StringRef::npos) { - error("unclosed quote"); + error("Unclosed quote"); return {}; } Ret.push_back(S.substr(1, E - 1)); @@ -217,7 +217,7 @@ if (S.startswith("/*")) { size_t E = S.find("*/", 2); if (E == StringRef::npos) { - error("unclosed comment in a linker script"); + error("Unclosed comment in a linker script"); return ""; } S = S.substr(E + 2); @@ -237,7 +237,7 @@ if (Error) return ""; if (atEOF()) { - setError("unexpected EOF"); + setError("Unexpected EOF"); return ""; } return Tokens[Pos++]; @@ -255,7 +255,7 @@ if (Error) return false; if (atEOF()) { - setError("unexpected EOF"); + setError("Unexpected EOF"); return false; } if (Tok != Tokens[Pos]) @@ -352,7 +352,7 @@ StringRef Tok = next(); auto MBOrErr = MemoryBuffer::getFile(Tok); if (!MBOrErr) { - setError("cannot open " + Tok); + setError("Cannot open " + Tok); return; } std::unique_ptr &MB = *MBOrErr; @@ -385,7 +385,7 @@ if (Tok == ")") return; if (Tok != ",") { - setError("unexpected token: " + Tok); + setError("Unexpected token: " + Tok); return; } next(); Index: ELF/OutputSections.cpp =================================================================== --- ELF/OutputSections.cpp +++ ELF/OutputSections.cpp @@ -683,7 +683,7 @@ PC = read64(F.PCRel); break; default: - fatal("unknown FDE size encoding"); + fatal("Unknown FDE size encoding"); } switch (F.Enc & 0x70) { case DW_EH_PE_absptr: @@ -691,7 +691,7 @@ case DW_EH_PE_pcrel: return PC + EhVA + F.Off + 8; default: - fatal("unknown FDE size relative encoding"); + fatal("Unknown FDE size relative encoding"); } } @@ -1002,7 +1002,7 @@ // Read a byte and advance D by one byte. static uint8_t readByte(ArrayRef &D) { if (D.empty()) - fatal("corrupted or unsupported CIE information"); + fatal("Corrupted or unsupported CIE information"); uint8_t B = D.front(); D = D.slice(1); return B; @@ -1015,7 +1015,7 @@ if ((Val & 0x80) == 0) return; } - fatal("corrupted or unsupported CIE information"); + fatal("Corrupted or unsupported CIE information"); } template static size_t getAugPSize(unsigned Enc) { @@ -1033,7 +1033,7 @@ case DW_EH_PE_sdata8: return 8; } - fatal("unknown FDE encoding"); + fatal("Unknown FDE encoding"); } template static void skipAugP(ArrayRef &D) { @@ -1042,7 +1042,7 @@ fatal("DW_EH_PE_aligned encoding is not supported"); size_t Size = getAugPSize(Enc); if (Size >= D.size()) - fatal("corrupted CIE"); + fatal("Corrupted CIE"); D = D.slice(Size); } @@ -1058,7 +1058,7 @@ const unsigned char *AugEnd = std::find(D.begin() + 1, D.end(), '\0'); if (AugEnd == D.end()) - fatal("corrupted CIE"); + fatal("Corrupted CIE"); StringRef Aug(reinterpret_cast(D.begin()), AugEnd - D.begin()); D = D.slice(Aug.size() + 1); @@ -1094,7 +1094,7 @@ readByte(D); continue; } - fatal("unknown .eh_frame augmentation string: " + Aug); + fatal("Unknown .eh_frame augmentation string: " + Aug); } return DW_EH_PE_absptr; } Index: ELF/SymbolTable.cpp =================================================================== --- ELF/SymbolTable.cpp +++ ELF/SymbolTable.cpp @@ -316,7 +316,7 @@ // equivalent (conflicting), or more preferable, respectively. int Comp = Existing->compare(New); if (Comp == 0) { - std::string S = "duplicate symbol: " + conflictMsg(Existing, New); + std::string S = "Duplicate symbol: " + conflictMsg(Existing, New); if (Config->AllowMultipleDefinition) warning(S); else Index: ELF/Target.cpp =================================================================== --- ELF/Target.cpp +++ ELF/Target.cpp @@ -535,7 +535,7 @@ write32le(Loc, Out::TlsPhdr->p_memsz - SA); break; default: - fatal("unrecognized reloc " + Twine(Type)); + fatal("Unrecognized reloc " + Twine(Type)); } } @@ -953,7 +953,7 @@ break; } default: - fatal("unrecognized reloc " + Twine(Type)); + fatal("Unrecognized reloc " + Twine(Type)); } } @@ -983,7 +983,7 @@ write16be(Loc, applyPPCLo(SA)); break; default: - fatal("unrecognized reloc " + Twine(Type)); + fatal("Unrecognized reloc " + Twine(Type)); } } @@ -1191,7 +1191,7 @@ write64be(Loc, SA); break; default: - fatal("unrecognized reloc " + Twine(Type)); + fatal("Unrecognized reloc " + Twine(Type)); } } @@ -1454,7 +1454,7 @@ break; } default: - fatal("unrecognized reloc " + Twine(Type)); + fatal("Unrecognized reloc " + Twine(Type)); } } @@ -1553,7 +1553,7 @@ void AMDGPUTargetInfo::relocateOne(uint8_t *Loc, uint8_t *BufEnd, uint32_t Type, uint64_t P, uint64_t SA, uint64_t ZA, uint8_t *PairedLoc) const { - llvm_unreachable("not implemented"); + llvm_unreachable("Not implemented"); } template MipsTargetInfo::MipsTargetInfo() { @@ -1770,7 +1770,7 @@ writeMipsLo16(Loc, S + readSignedLo16(Loc) - P); break; default: - fatal("unrecognized reloc " + Twine(Type)); + fatal("Unrecognized reloc " + Twine(Type)); } } Index: ELF/Writer.cpp =================================================================== --- ELF/Writer.cpp +++ ELF/Writer.cpp @@ -516,7 +516,7 @@ if ((Config->Relocatable || Config->Shared) && !Config->NoUndefined) return; - std::string Msg = "undefined symbol: " + Sym->getName().str(); + std::string Msg = "Undefined symbol: " + Sym->getName().str(); if (InputFile *File = Symtab.findFile(Sym)) Msg += " in " + File->getName().str(); if (Config->NoinhibitExec) @@ -1525,7 +1525,7 @@ ErrorOr> BufferOrErr = FileOutputBuffer::create(Config->OutputFile, FileSize, FileOutputBuffer::F_executable); - if (error(BufferOrErr, "failed to open " + Config->OutputFile)) + if (error(BufferOrErr, "Failed to open " + Config->OutputFile)) return false; Buffer = std::move(*BufferOrErr); return true; Index: test/ELF/basic.s =================================================================== --- test/ELF/basic.s +++ test/ELF/basic.s @@ -192,25 +192,25 @@ # RUN: not ld.lld %t.foo -o %t2 2>&1 | \ # RUN: FileCheck --check-prefix=MISSING %s -# MISSING: cannot open {{.*}}.foo: {{[Nn]}}o such file or directory +# MISSING: Cannot open {{.*}}.foo: {{[Nn]}}o such file or directory # RUN: not ld.lld -o %t2 2>&1 | \ # RUN: FileCheck --check-prefix=NO_INPUT %s -# NO_INPUT: no input files. +# NO_INPUT: No input files # RUN: not ld.lld %t.no.such.file -o %t2 2>&1 | \ # RUN: FileCheck --check-prefix=CANNOT_OPEN %s -# CANNOT_OPEN: cannot open {{.*}}.no.such.file: {{[Nn]}}o such file or directory +# CANNOT_OPEN: Cannot open {{.*}}.no.such.file: {{[Nn]}}o such file or directory # RUN: not ld.lld %t -o 2>&1 | FileCheck --check-prefix=NO_O_VAL %s -# NO_O_VAL: missing arg value for "-o", expected 1 argument. +# NO_O_VAL: Missing arg value for "-o", expected 1 argument. # RUN: not ld.lld --foo 2>&1 | FileCheck --check-prefix=UNKNOWN %s -# UNKNOWN: unknown argument: --foo +# UNKNOWN: Warning: unknown argument: --foo # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t # RUN: not ld.lld %t %t -o %t2 2>&1 | FileCheck --check-prefix=DUP %s -# DUP: duplicate symbol: _start in {{.*}} and {{.*}} +# DUP: Duplicate symbol: _start in {{.*}} and {{.*}} # RUN: not ld.lld %t -o %t -m wrong_emul 2>&1 | FileCheck --check-prefix=UNKNOWN_EMUL %s # UNKNOWN_EMUL: Unknown emulation: wrong_emul Index: test/ELF/conflict.s =================================================================== --- test/ELF/conflict.s +++ test/ELF/conflict.s @@ -3,20 +3,20 @@ # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t1.o # RUN: not ld.lld %t1.o %t1.o -o %t2 2>&1 | FileCheck -check-prefix=DEMANGLE %s -# DEMANGLE: duplicate symbol: {{mul\(double, double\)|_Z3muldd}} in -# DEMANGLE: duplicate symbol: foo in +# DEMANGLE: Duplicate symbol: {{mul\(double, double\)|_Z3muldd}} in +# DEMANGLE: Duplicate symbol: foo in # RUN: not ld.lld %t1.o %t1.o -o %t2 --no-demangle 2>&1 | \ # RUN: FileCheck -check-prefix=NO_DEMANGLE %s -# NO_DEMANGLE: duplicate symbol: _Z3muldd in -# NO_DEMANGLE: duplicate symbol: foo in +# NO_DEMANGLE: Duplicate symbol: _Z3muldd in +# NO_DEMANGLE: Duplicate symbol: foo in # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %S/Inputs/conflict.s -o %t2.o # RUN: llvm-ar rcs %t3.a %t2.o # RUN: not ld.lld %t1.o %t3.a -u baz -o %t2 2>&1 | FileCheck -check-prefix=ARCHIVE %s -# ARCHIVE: duplicate symbol: foo in {{.*}}1.o and {{.*}}3.a({{.*}}2.o) +# ARCHIVE: Duplicate symbol: foo in {{.*}}1.o and {{.*}}3.a({{.*}}2.o) .globl _Z3muldd, foo _Z3muldd: Index: test/ELF/driver.test =================================================================== --- test/ELF/driver.test +++ test/ELF/driver.test @@ -3,16 +3,16 @@ # RUN: not ld.lld --unknown1 --unknown2 -m foo /no/such/file -lnosuchlib \ # RUN: 2>&1 | FileCheck -check-prefix=UNKNOWN %s -# UNKNOWN: warning: unknown argument: --unknown1 -# UNKNOWN: warning: unknown argument: --unknown2 -# UNKNOWN: unknown argument(s) found +# UNKNOWN: Warning: unknown argument: --unknown1 +# UNKNOWN: Warning: unknown argument: --unknown2 +# UNKNOWN: Unknown argument(s) found # UNKNOWN: Unknown emulation: foo -# UNKNOWN: cannot open /no/such/file +# UNKNOWN: Cannot open /no/such/file # UNKNOWN: Unable to find library -lnosuchlib # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t # RUN: not ld.lld %t -o /no/such/file 2>&1 | FileCheck -check-prefix=MISSING %s -# MISSING: failed to open /no/such/file +# MISSING: Failed to open /no/such/file # RUN: ld.lld --help 2>&1 | FileCheck -check-prefix=HELP %s # HELP: USAGE: Index: test/ELF/duplicate-internal.s =================================================================== --- test/ELF/duplicate-internal.s +++ test/ELF/duplicate-internal.s @@ -3,7 +3,7 @@ # RUN: llvm-mc -filetype=obj -triple=mips-unknown-linux %s -o %t.o # RUN: not ld.lld -shared %t.o -o %t.so 2>&1 | FileCheck %s -# CHECK: duplicate symbol: _gp in (internal) and {{.*}} +# CHECK: Duplicate symbol: _gp in (internal) and {{.*}} # REQUIRES: mips Index: test/ELF/invalid-elf.test =================================================================== --- test/ELF/invalid-elf.test +++ test/ELF/invalid-elf.test @@ -14,7 +14,7 @@ # RUN: not ld.lld %p/Inputs/invalid-binding.elf -o %t2 2>&1 | \ # RUN: FileCheck --check-prefix=INVALID-BINDING %s -# INVALID-BINDING: unexpected binding +# INVALID-BINDING: Unexpected binding # RUN: not ld.lld %p/Inputs/invalid-section-index.elf -o %t2 2>&1 | \ # RUN: FileCheck --check-prefix=INVALID-SECTION-INDEX %s Index: test/ELF/libsearch.s =================================================================== --- test/ELF/libsearch.s +++ test/ELF/libsearch.s @@ -13,12 +13,12 @@ // Should fail if no library specified // RUN: not ld.lld -l 2>&1 \ // RUN: | FileCheck --check-prefix=NOLIBRARY %s -// NOLIBRARY: missing arg value for "-l", expected 1 argument. +// NOLIBRARY: Missing arg value for "-l", expected 1 argument. // Should not link because of undefined symbol _bar // RUN: not ld.lld -o %t3 %t.o 2>&1 \ // RUN: | FileCheck --check-prefix=UNDEFINED %s -// UNDEFINED: undefined symbol: _bar +// UNDEFINED: Undefined symbol: _bar // Should fail if cannot find specified library (without -L switch) // RUN: not ld.lld -o %t3 %t.o -lls 2>&1 \ Index: test/ELF/linkerscript.s =================================================================== --- test/ELF/linkerscript.s +++ test/ELF/linkerscript.s @@ -58,7 +58,7 @@ # RUN: not ld.lld -o %t2 %t.script %t > %t.log 2>&1 # RUN: FileCheck -check-prefix=ERR-ENTRY %s < %t.log -# ERR-ENTRY: undefined symbol: _wrong_label +# ERR-ENTRY: Undefined symbol: _wrong_label # -e has precedence over linker script's ENTRY. # RUN: echo "ENTRY(_label)" > %t.script @@ -104,7 +104,7 @@ # RUN: not ld.lld -o foo %t.script > %t.log 2>&1 # RUN: FileCheck -check-prefix=ERR1 %s < %t.log -# ERR1: unknown directive: FOO +# ERR1: Unknown directive: FOO .globl _start, _label; _start: Index: test/ELF/lto/duplicated.ll =================================================================== --- test/ELF/lto/duplicated.ll +++ test/ELF/lto/duplicated.ll @@ -1,7 +1,7 @@ ; REQUIRES: x86 ; RUN: llvm-as %s -o %t.o ; RUN: not ld.lld -m elf_x86_64 %t.o %t.o -o %t.so -shared 2>&1 | FileCheck %s -; CHECK: duplicate symbol: f in {{.*}}.o and {{.*}}.o +; CHECK: Duplicate symbol: f in {{.*}}.o and {{.*}}.o target triple = "x86_64-unknown-linux-gnu" target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" Index: test/ELF/sysroot.s =================================================================== --- test/ELF/sysroot.s +++ test/ELF/sysroot.s @@ -9,7 +9,7 @@ // Should not link because of undefined symbol _bar // RUN: not ld.lld -o %t/r %t/m.o 2>&1 \ // RUN: | FileCheck --check-prefix=UNDEFINED %s -// UNDEFINED: undefined symbol: _bar +// UNDEFINED: Undefined symbol: _bar // We need to be sure that there is no suitable library in the /lib directory // RUN: not ld.lld -o %t/r %t/m.o -L/lib -l:libls.a 2>&1 \ Index: test/ELF/tls-static.s =================================================================== --- test/ELF/tls-static.s +++ test/ELF/tls-static.s @@ -10,4 +10,4 @@ _start: call __tls_get_addr -// CHECK: undefined symbol: __tls_get_addr +// CHECK: Undefined symbol: __tls_get_addr Index: test/ELF/undef-start.s =================================================================== --- test/ELF/undef-start.s +++ test/ELF/undef-start.s @@ -1,4 +1,4 @@ # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t # RUN: not ld.lld %t -o %t2 2>&1 | FileCheck %s -# CHECK: undefined symbol: _start +# CHECK: Undefined symbol: _start # REQUIRES: x86 Index: test/ELF/undef.s =================================================================== --- test/ELF/undef.s +++ test/ELF/undef.s @@ -1,7 +1,7 @@ # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t # RUN: not ld.lld %t -o %t2 2>&1 | FileCheck %s -# CHECK: undefined symbol: bar in {{.*}} -# CHECK: undefined symbol: foo in {{.*}} +# CHECK: Undefined symbol: bar in {{.*}} +# CHECK: Undefined symbol: foo in {{.*}} # REQUIRES: x86 .globl _start