Index: lld/ELF/DWARF.cpp =================================================================== --- lld/ELF/DWARF.cpp +++ lld/ELF/DWARF.cpp @@ -56,17 +56,17 @@ namespace { template struct LLDRelocationResolver { - // In the ELF ABIs, S sepresents the value of the symbol in the relocation + // In the ELF ABIs, s represents the value of the symbol in the relocation // entry. For Rela, the addend is stored as part of the relocation entry. static uint64_t resolve(object::RelocationRef ref, uint64_t s, - uint64_t /* A */) { + uint64_t a) { return s + ref.getRawDataRefImpl().p; } }; template struct LLDRelocationResolver> { - // For Rel, the addend A is supplied by the caller. - static uint64_t resolve(object::RelocationRef /*Ref*/, uint64_t s, + // For Rel, the addend a is supplied by the caller. + static uint64_t resolve(object::RelocationRef ref, uint64_t s, uint64_t a) { return s + a; } Index: lld/ELF/Driver.cpp =================================================================== --- lld/ELF/Driver.cpp +++ lld/ELF/Driver.cpp @@ -272,7 +272,7 @@ // Add a given library by searching it from input search paths. void LinkerDriver::addLibrary(StringRef name) { if (Optional path = searchLibrary(name)) - addFile(*path, /*WithLOption=*/true); + addFile(*path, /*withLOption=*/true); else error("unable to find library -l" + name); } @@ -1014,7 +1014,7 @@ if (Optional buffer = readFile(arg->getValue())) for (StringRef s : args::getLines(*buffer)) config->versionScriptGlobals.push_back( - {s, /*IsExternCpp*/ false, /*HasWildcard*/ false}); + {s, /*isExternCpp=*/false, /*hasWildcard=*/false}); } bool hasExportDynamic = @@ -1030,7 +1030,7 @@ for (auto *arg : args.filtered(OPT_export_dynamic_symbol)) config->dynamicList.push_back( - {arg->getValue(), /*IsExternCpp*/ false, /*HasWildcard*/ false}); + {arg->getValue(), /*isExternCpp=*/false, /*hasWildcard=*/false}); } // If --export-dynamic-symbol=foo is given and symbol foo is defined in @@ -1118,7 +1118,7 @@ addLibrary(arg->getValue()); break; case OPT_INPUT: - addFile(arg->getValue(), /*WithLOption=*/false); + addFile(arg->getValue(), /*withLOption=*/false); break; case OPT_defsym: { StringRef from; @@ -1386,7 +1386,7 @@ bss->markDead(); inputSections.push_back(bss); s->replace(Defined{s->file, s->getName(), s->binding, s->stOther, s->type, - /*Value=*/0, s->size, bss}); + /*value=*/0, s->size, bss}); }); } @@ -1540,7 +1540,7 @@ for (InputFile *file : lto->compile()) { auto *obj = cast>(file); - obj->parse(/*IgnoreComdats=*/true); + obj->parse(/*ignoreComdats=*/true); for (Symbol *sym : obj->getGlobalSymbols()) sym->parseSymbolVersion(); objectFiles.push_back(file); Index: lld/ELF/DriverUtils.cpp =================================================================== --- lld/ELF/DriverUtils.cpp +++ lld/ELF/DriverUtils.cpp @@ -146,7 +146,7 @@ void elf::printHelp() { ELFOptTable().PrintHelp( outs(), (config->progName + " [options] file...").str().c_str(), "lld", - false /*ShowHidden*/, true /*ShowAllAliases*/); + /*showHidden=*/false, /*showAllAliases=*/true); outs() << "\n"; // Scripts generated by Libtool versions up to at least 2.4.6 (the most Index: lld/ELF/InputFiles.cpp =================================================================== --- lld/ELF/InputFiles.cpp +++ lld/ELF/InputFiles.cpp @@ -550,11 +550,11 @@ if (!config->dependentLibraries) return; if (fs::exists(specifier)) - driver->addFile(specifier, /*WithLOption=*/false); + driver->addFile(specifier, /*withLOption=*/false); else if (Optional s = findFromSearchPaths(specifier)) - driver->addFile(*s, /*WithLOption=*/true); + driver->addFile(*s, /*withLOption=*/true); else if (Optional s = searchLibraryBaseName(specifier)) - driver->addFile(*s, /*WithLOption=*/true); + driver->addFile(*s, /*withLOption=*/true); else error(toString(f) + ": unable to find library from dependent library specifier: " + @@ -1082,7 +1082,7 @@ this->symbols[i] = make(this, name, binding, stOther, type); else if (sec == &InputSection::discarded) this->symbols[i] = make(this, name, binding, stOther, type, - /*DiscardedSecIdx=*/secIdx); + /*discardedSecIdx=*/secIdx); else this->symbols[i] = make(this, name, binding, stOther, type, value, size, sec); Index: lld/ELF/InputSection.cpp =================================================================== --- lld/ELF/InputSection.cpp +++ lld/ELF/InputSection.cpp @@ -362,7 +362,7 @@ uint32_t alignment, ArrayRef data, StringRef name, Kind k) : InputSectionBase(f, flags, type, - /*Entsize*/ 0, /*Link*/ 0, /*Info*/ 0, alignment, data, + /*entsize=*/0, /*link=*/0, /*info=*/0, alignment, data, name, k) {} template @@ -1252,8 +1252,8 @@ MergeInputSection::MergeInputSection(uint64_t flags, uint32_t type, uint64_t entsize, ArrayRef data, StringRef name) - : InputSectionBase(nullptr, flags, type, entsize, /*Link*/ 0, /*Info*/ 0, - /*Alignment*/ entsize, data, name, SectionBase::Merge) {} + : InputSectionBase(nullptr, flags, type, entsize, /*link=*/0, /*info=*/0, + /*alignment=*/entsize, data, name, SectionBase::Merge) {} // This function is called after we obtain a complete list of input sections // that need to be linked. This is responsible to split section contents Index: lld/ELF/LTO.cpp =================================================================== --- lld/ELF/LTO.cpp +++ lld/ELF/LTO.cpp @@ -119,7 +119,7 @@ if (config->saveTemps) checkError(c.addSaveTemps(config->outputFile.str() + ".", - /*UseInputModulePath*/ true)); + /*useInputModulePath=*/true)); return c; } @@ -220,7 +220,7 @@ if (!os) continue; - ModuleSummaryIndex m(/*HaveGVs*/ false); + ModuleSummaryIndex m(/*haveGVs=*/false); m.setSkipModuleByDistributedBackend(); WriteIndexToFile(m, *os); if (config->thinLTOEmitImportsFiles) Index: lld/ELF/OutputSections.cpp =================================================================== --- lld/ELF/OutputSections.cpp +++ lld/ELF/OutputSections.cpp @@ -68,8 +68,8 @@ OutputSection::OutputSection(StringRef name, uint32_t type, uint64_t flags) : BaseCommand(OutputSectionKind), - SectionBase(Output, name, flags, /*Entsize*/ 0, /*Alignment*/ 1, type, - /*Info*/ 0, /*Link*/ 0) {} + SectionBase(Output, name, flags, /*entsize=*/0, /*alignment=*/1, type, + /*info=*/0, /*link=*/0) {} // We allow sections of types listed below to merged into a // single progbits section. This is typically done by linker Index: lld/ELF/ScriptParser.cpp =================================================================== --- lld/ELF/ScriptParser.cpp +++ lld/ELF/ScriptParser.cpp @@ -280,26 +280,26 @@ SmallString<128> pathData; StringRef path = (config->sysroot + s).toStringRef(pathData); if (sys::fs::exists(path)) { - driver->addFile(Saver.save(path), /*WithLOption=*/false); + driver->addFile(Saver.save(path), /*withLOption=*/false); return; } } if (s.startswith("/")) { - driver->addFile(s, /*WithLOption=*/false); + driver->addFile(s, /*withLOption=*/false); } else if (s.startswith("=")) { if (config->sysroot.empty()) - driver->addFile(s.substr(1), /*WithLOption=*/false); + driver->addFile(s.substr(1), /*withLOption=*/false); else driver->addFile(Saver.save(config->sysroot + "/" + s.substr(1)), - /*WithLOption=*/false); + /*withLOption=*/false); } else if (s.startswith("-l")) { driver->addLibrary(s.substr(2)); } else if (sys::fs::exists(s)) { - driver->addFile(s, /*WithLOption=*/false); + driver->addFile(s, /*withLOption=*/false); } else { if (Optional path = findFromSearchPaths(s)) - driver->addFile(Saver.save(*path), /*WithLOption=*/true); + driver->addFile(Saver.save(*path), /*withLOption=*/true); else setError("unable to find " + s); } Index: lld/ELF/Thunks.cpp =================================================================== --- lld/ELF/Thunks.cpp +++ lld/ELF/Thunks.cpp @@ -319,7 +319,7 @@ Defined *Thunk::addSymbol(StringRef name, uint8_t type, uint64_t value, InputSectionBase §ion) { - Defined *d = addSyntheticLocal(name, type, value, /*Size=*/0, section); + Defined *d = addSyntheticLocal(name, type, value, /*size=*/0, section); syms.push_back(d); return d; } Index: lld/ELF/Writer.cpp =================================================================== --- lld/ELF/Writer.cpp +++ lld/ELF/Writer.cpp @@ -204,8 +204,8 @@ if (!s || s->isDefined()) return nullptr; - s->resolve(Defined{/*File=*/nullptr, name, binding, stOther, STT_NOTYPE, val, - /*Size=*/0, sec}); + s->resolve(Defined{/*file=*/nullptr, name, binding, stOther, STT_NOTYPE, val, + /*size=*/0, sec}); return cast(s); } @@ -265,8 +265,8 @@ if (config->emachine == EM_PPC64) gotOff = 0x8000; - s->resolve(Defined{/*File=*/nullptr, gotSymName, STB_GLOBAL, STV_HIDDEN, - STT_NOTYPE, gotOff, /*Size=*/0, Out::elfHeader}); + s->resolve(Defined{/*file=*/nullptr, gotSymName, STB_GLOBAL, STV_HIDDEN, + STT_NOTYPE, gotOff, /*size=*/0, Out::elfHeader}); ElfSym::globalOffsetTable = cast(s); } @@ -501,7 +501,7 @@ // We always need to add rel[a].plt to output if it has entries. // Even for static linking it can contain R_[*]_IRELATIVE relocations. in.relaPlt = make>( - config->isRela ? ".rela.plt" : ".rel.plt", false /*Sort*/); + config->isRela ? ".rela.plt" : ".rel.plt", /*sort=*/false); add(in.relaPlt); // The RelaIplt immediately follows .rel.plt (.rel.dyn for ARM) to ensure @@ -514,7 +514,7 @@ (config->emachine == EM_ARM && !config->androidPackDynRelocs) ? ".rel.dyn" : in.relaPlt->name, - false /*Sort*/); + /*sort=*/false); add(in.relaIplt); in.plt = make(false); @@ -751,8 +751,8 @@ continue; auto *sym = - make(isec->file, "", STB_LOCAL, /*StOther=*/0, STT_SECTION, - /*Value=*/0, /*Size=*/0, isec); + make(isec->file, "", STB_LOCAL, /*stOther=*/0, STT_SECTION, + /*value=*/0, /*size=*/0, isec); in.symTab->addSymbol(sym); } } @@ -1689,9 +1689,9 @@ // Even the author of gold doesn't remember why gold behaves that way. // https://sourceware.org/ml/binutils/2002-03/msg00360.html if (mainPart->dynamic->parent) - symtab->addSymbol(Defined{/*File=*/nullptr, "_DYNAMIC", STB_WEAK, + symtab->addSymbol(Defined{/*file=*/nullptr, "_DYNAMIC", STB_WEAK, STV_HIDDEN, STT_NOTYPE, - /*Value=*/0, /*Size=*/0, mainPart->dynamic}); + /*value=*/0, /*size=*/0, mainPart->dynamic}); // Define __rel[a]_iplt_{start,end} symbols if needed. addRelIpltSymbols(); @@ -1717,9 +1717,9 @@ // define _TLS_MODULE_BASE_ relative to the first TLS section. Symbol *s = symtab->find("_TLS_MODULE_BASE_"); if (s && s->isUndefined()) { - s->resolve(Defined{/*File=*/nullptr, s->getName(), STB_GLOBAL, STV_HIDDEN, - STT_TLS, /*Value=*/0, 0, - /*Section=*/nullptr}); + s->resolve(Defined{/*file=*/nullptr, s->getName(), STB_GLOBAL, STV_HIDDEN, + STT_TLS, /*value=*/0, 0, + /*section=*/nullptr}); ElfSym::tlsModuleBase = cast(s); } }