diff --git a/lld/Common/Filesystem.cpp b/lld/Common/Filesystem.cpp index c3d3f998f03b75..75e88dbce1ab4f 100644 --- a/lld/Common/Filesystem.cpp +++ b/lld/Common/Filesystem.cpp @@ -87,7 +87,7 @@ void lld::unlinkAsync(StringRef path) { // We also don't want to reimplement heuristics to determine if a // file is writable. So we'll let FileOutputBuffer do the work. // -// FileOutputBuffer doesn't touch a desitnation file until commit() +// FileOutputBuffer doesn't touch a destination file until commit() // is called. We use that class without calling commit() to predict // if the given file is writable. std::error_code lld::tryCreateFile(StringRef path) { diff --git a/lld/ELF/Arch/X86.cpp b/lld/ELF/Arch/X86.cpp index 1e8a10cfce7a93..c85684b5acdb15 100644 --- a/lld/ELF/Arch/X86.cpp +++ b/lld/ELF/Arch/X86.cpp @@ -116,7 +116,7 @@ RelExpr X86::getRelExpr(RelType type, const Symbol &s, // address at runtime (which means code is position-independent but // compilers need to emit extra code for each GOT access.) This decision // is made at compile-time. In the latter case, compilers emit code to - // load an GOT address to a register, which is usually %ebx. + // load a GOT address to a register, which is usually %ebx. // // So, there are two ways to refer to symbol foo's GOT entry: foo@GOT or // foo@GOT(%ebx). diff --git a/lld/ELF/ICF.cpp b/lld/ELF/ICF.cpp index 5e38066f45babb..8992b6564a8ab9 100644 --- a/lld/ELF/ICF.cpp +++ b/lld/ELF/ICF.cpp @@ -42,7 +42,7 @@ // relocation targets. Relocation targets are considered equivalent if // their targets are in the same equivalence class. Sections with // different relocation targets are put into different equivalence -// clases. +// classes. // // 3. If we split an equivalence class in step 2, two relocations // previously target the same equivalence class may now target diff --git a/lld/ELF/InputFiles.cpp b/lld/ELF/InputFiles.cpp index 04bad8ef4efd36..43978cd66c61f7 100644 --- a/lld/ELF/InputFiles.cpp +++ b/lld/ELF/InputFiles.cpp @@ -296,7 +296,7 @@ Optional ObjFile::getDILineInfo(InputSectionBase *s, } } - // Use fake address calcuated by adding section file offset and offset in + // Use fake address calculated by adding section file offset and offset in // section. See comments for ObjectInfo class. return dwarf->getDILineInfo(s->getOffsetInFile() + offset, sectionIndex); } diff --git a/lld/ELF/InputSection.cpp b/lld/ELF/InputSection.cpp index 25375ea2a5748e..aab272f53a7367 100644 --- a/lld/ELF/InputSection.cpp +++ b/lld/ELF/InputSection.cpp @@ -421,7 +421,7 @@ void InputSection::copyRelocations(uint8_t *buf, ArrayRef rels) { p->r_addend = getAddend(rel); // Output section VA is zero for -r, so r_offset is an offset within the - // section, but for --emit-relocs it is an virtual address. + // section, but for --emit-relocs it is a virtual address. p->r_offset = sec->getVA(rel.r_offset); p->setSymbolAndType(in.symTab->getSymbolIndex(&sym), type, config->isMips64EL); diff --git a/lld/ELF/OutputSections.cpp b/lld/ELF/OutputSections.cpp index 8d328626b85f95..6142cb0783ceb8 100644 --- a/lld/ELF/OutputSections.cpp +++ b/lld/ELF/OutputSections.cpp @@ -89,7 +89,7 @@ static bool canMergeToProgbits(unsigned type) { // InputSection post finalizeInputSections(), then you must do the following: // // 1. Find or create an InputSectionDescription to hold InputSection. -// 2. Add the InputSection to the InputSectionDesciption::sections. +// 2. Add the InputSection to the InputSectionDescription::sections. // 3. Call commitSection(isec). void OutputSection::recordSection(InputSectionBase *isec) { partition = isec->partition; diff --git a/lld/docs/WebAssembly.rst b/lld/docs/WebAssembly.rst index 92bae2aea32c55..7f4a688140fd9d 100644 --- a/lld/docs/WebAssembly.rst +++ b/lld/docs/WebAssembly.rst @@ -62,7 +62,7 @@ WebAssembly-specific options: Relocation targets in the code section 5-bytes wide in order to potentially occomate the largest LEB128 value. This option will cause the linker to shirnk the code section to remove any padding from the final output. However - because it effects code offset, this option is not comatible with outputing + because it effects code offset, this option is not compatible with outputing debug information. .. option:: --allow-undefined diff --git a/lld/docs/windows_support.rst b/lld/docs/windows_support.rst index c9723c42fcc805..620040ee8196a6 100644 --- a/lld/docs/windows_support.rst +++ b/lld/docs/windows_support.rst @@ -28,7 +28,7 @@ Development status Driver :good:`Mostly done`. Some exotic command line options that are not usually - used for application develompent, such as ``/DRIVER``, are not supported. + used for application development, such as ``/DRIVER``, are not supported. Linking against DLL :good:`Done`. LLD can read import libraries needed to link against DLL. Both diff --git a/lld/include/lld/Core/Atom.h b/lld/include/lld/Core/Atom.h index 4d3d27a2af57ba..d89792d84d1c07 100644 --- a/lld/include/lld/Core/Atom.h +++ b/lld/include/lld/Core/Atom.h @@ -38,7 +38,7 @@ class Atom { definitionSharedLibrary ///< Only in shared libraries to model export. }; - /// The scope in which this atom is acessible to other atoms. + /// The scope in which this atom is accessible to other atoms. enum Scope { scopeTranslationUnit, ///< Accessible only to atoms in the same translation /// unit (e.g. a C static). diff --git a/lld/include/lld/Core/Instrumentation.h b/lld/include/lld/Core/Instrumentation.h index 602a37aff57cb9..e0b1145fe4e99f 100644 --- a/lld/include/lld/Core/Instrumentation.h +++ b/lld/include/lld/Core/Instrumentation.h @@ -58,7 +58,7 @@ class StringHandle { /// Each thread has its own task stack and tasks nest recursively on that stack. /// A task cannot transfer threads. /// -/// SBRM is used to ensure task starts and ends are ballanced. The lifetime of +/// SBRM is used to ensure task starts and ends are balanced. The lifetime of /// a task is either the lifetime of this object, or until end is called. class ScopedTask { __itt_domain *_domain; diff --git a/lld/include/lld/Core/Reference.h b/lld/include/lld/Core/Reference.h index 191e0f07ec3811..4769882cde5073 100644 --- a/lld/include/lld/Core/Reference.h +++ b/lld/include/lld/Core/Reference.h @@ -104,7 +104,7 @@ class Reference { /// The memory for Reference objects is always managed by the owning File /// object. Therefore, no one but the owning File object should call - /// delete on an Reference. In fact, some File objects may bulk allocate + /// delete on a Reference. In fact, some File objects may bulk allocate /// an array of References, so they cannot be individually deleted by anyone. virtual ~Reference() = default; diff --git a/lld/include/lld/ReaderWriter/MachOLinkingContext.h b/lld/include/lld/ReaderWriter/MachOLinkingContext.h index a950fd5b18e5a7..cd57604fa17d77 100644 --- a/lld/include/lld/ReaderWriter/MachOLinkingContext.h +++ b/lld/include/lld/ReaderWriter/MachOLinkingContext.h @@ -248,7 +248,7 @@ class MachOLinkingContext : public LinkingContext { /// installed dynamic library. uint32_t compatibilityVersion() const { return _compatibilityVersion; } - /// The dylib's current version, in the the raw uint32 format. + /// The dylib's current version, in the raw uint32 format. /// /// When building a dynamic library, this is the current version that gets /// embedded into the result. Other Mach-O binaries that link against diff --git a/lld/lib/Core/Resolver.cpp b/lld/lib/Core/Resolver.cpp index 88119130852c71..d1c3d8159f585f 100644 --- a/lld/lib/Core/Resolver.cpp +++ b/lld/lib/Core/Resolver.cpp @@ -435,7 +435,7 @@ bool Resolver::checkUndefines() { return true; } -// remove from _atoms all coaleseced away atoms +// Remove from _atoms all coalesced away atoms. void Resolver::removeCoalescedAwayAtoms() { DEBUG_WITH_TYPE("resolver", llvm::dbgs() << "******** Removing coalesced away atoms:\n"); diff --git a/lld/lib/Driver/DarwinLdDriver.cpp b/lld/lib/Driver/DarwinLdDriver.cpp index 10e0aa3d9fee4f..062e945bbd83bd 100644 --- a/lld/lib/Driver/DarwinLdDriver.cpp +++ b/lld/lib/Driver/DarwinLdDriver.cpp @@ -788,7 +788,7 @@ bool parse(llvm::ArrayRef args, MachOLinkingContext &ctx) { break; case llvm::MachO::MH_EXECUTE: // dynamic executables default to generating a version load command, - // while static exectuables only generate it if required. + // while static executables only generate it if required. if (isStaticExecutable) { if (flagOn) ctx.setGenerateVersionLoadCommand(true); @@ -836,7 +836,7 @@ bool parse(llvm::ArrayRef args, MachOLinkingContext &ctx) { break; case llvm::MachO::MH_EXECUTE: // dynamic executables default to generating a version load command, - // while static exectuables only generate it if required. + // while static executables only generate it if required. if (isStaticExecutable) { if (flagOn) ctx.setGenerateFunctionStartsLoadCommand(true); @@ -885,7 +885,7 @@ bool parse(llvm::ArrayRef args, MachOLinkingContext &ctx) { break; case llvm::MachO::MH_EXECUTE: // dynamic executables default to generating a version load command, - // while static exectuables only generate it if required. + // while static executables only generate it if required. if (isStaticExecutable) { if (flagOn) ctx.setGenerateDataInCodeLoadCommand(true); @@ -926,7 +926,7 @@ bool parse(llvm::ArrayRef args, MachOLinkingContext &ctx) { ctx.setSdkVersion(sdkVersion); } else if (ctx.generateVersionLoadCommand()) { // If we don't have an sdk version, but were going to emit a load command - // with min_version, then we need to give an warning as we have no sdk + // with min_version, then we need to give a warning as we have no sdk // version to put in that command. // FIXME: We need to decide whether to make this an error. warn("-sdk_version is required when emitting min version load command. " diff --git a/lld/lib/ReaderWriter/MachO/CompactUnwindPass.cpp b/lld/lib/ReaderWriter/MachO/CompactUnwindPass.cpp index 44e6a29a0b6033..94a105a6f159eb 100644 --- a/lld/lib/ReaderWriter/MachO/CompactUnwindPass.cpp +++ b/lld/lib/ReaderWriter/MachO/CompactUnwindPass.cpp @@ -304,7 +304,7 @@ class CompactUnwindPass : public Pass { // also probably be sorted by frequency. assert(personalities.size() <= 4); - // TODO: Find commmon encodings for use by compressed pages. + // TODO: Find common encodings for use by compressed pages. std::vector commonEncodings; // Now sort the entries by final address and fixup the compact encoding to diff --git a/lld/lib/ReaderWriter/MachO/File.h b/lld/lib/ReaderWriter/MachO/File.h index 1cc1c4109dce70..072702973f81a4 100644 --- a/lld/lib/ReaderWriter/MachO/File.h +++ b/lld/lib/ReaderWriter/MachO/File.h @@ -135,7 +135,7 @@ class MachOFile : public SimpleFile { _undefAtoms[name] = atom; } - /// Search this file for an the atom from 'section' that covers + /// Search this file for the atom from 'section' that covers /// 'offsetInSect'. Returns nullptr is no atom found. MachODefinedAtom *findAtomCoveringAddress(const Section §ion, uint64_t offsetInSect, diff --git a/lld/lib/ReaderWriter/MachO/GOTPass.cpp b/lld/lib/ReaderWriter/MachO/GOTPass.cpp index 514dd4e09da8db..0f80dfa19d09c4 100644 --- a/lld/lib/ReaderWriter/MachO/GOTPass.cpp +++ b/lld/lib/ReaderWriter/MachO/GOTPass.cpp @@ -109,7 +109,7 @@ class GOTPass : public Pass { assert(target != nullptr); if (!shouldReplaceTargetWithGOTAtom(target, canBypassGOT)) { - // Update reference kind to reflect that target is a direct accesss. + // Update reference kind to reflect that target is a direct access. _archHandler.updateReferenceToGOT(ref, false); } else { // Replace the target with a reference to a GOT entry. diff --git a/lld/lib/ReaderWriter/MachO/MachOLinkingContext.cpp b/lld/lib/ReaderWriter/MachO/MachOLinkingContext.cpp index 221d895a40d065..0be1c10a7ab083 100644 --- a/lld/lib/ReaderWriter/MachO/MachOLinkingContext.cpp +++ b/lld/lib/ReaderWriter/MachO/MachOLinkingContext.cpp @@ -830,7 +830,7 @@ void MachOLinkingContext::addExportSymbol(StringRef sym) { } // Only i386 MacOSX uses old ABI, so don't change those. if ((_os != OS::macOSX) || (_arch != arch_x86)) { - // ObjC has two differnent ABIs. Be nice and allow one export list work for + // ObjC has two different ABIs. Be nice and allow one export list work for // both ABIs by renaming symbols. if (sym.startswith(".objc_class_name_")) { std::string abi2className("_OBJC_CLASS_$_"); diff --git a/lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryWriter.cpp b/lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryWriter.cpp index ab7ea7e07f23ef..17b45b9ca82782 100644 --- a/lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryWriter.cpp +++ b/lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryWriter.cpp @@ -1267,7 +1267,7 @@ void TrieNode::addSymbol(const Export& entry, edge._child->addSymbol(entry, allocator, allNodes); return; } - // See if string has commmon prefix with existing edge. + // See if string has common prefix with existing edge. for (int n=edgeStr.size()-1; n > 0; --n) { if (partialStr.substr(0, n).equals(edgeStr.substr(0, n))) { // Splice in new node: was A -> C, now A -> B -> C @@ -1351,7 +1351,7 @@ bool TrieNode::updateOffset(uint32_t& offset) { nodeSize += llvm::getULEB128Size(nodeSize); } // Compute size of all child edges. - ++nodeSize; // Byte for number of chidren. + ++nodeSize; // Byte for number of children. for (TrieEdge &edge : _children) { nodeSize += edge._subString.size() + 1 // String length. + llvm::getULEB128Size(edge._child->_trieOffset); // Offset len. diff --git a/lld/lib/ReaderWriter/MachO/MachONormalizedFileToAtoms.cpp b/lld/lib/ReaderWriter/MachO/MachONormalizedFileToAtoms.cpp index 6f294b1ecd0f27..3347bb13508e70 100644 --- a/lld/lib/ReaderWriter/MachO/MachONormalizedFileToAtoms.cpp +++ b/lld/lib/ReaderWriter/MachO/MachONormalizedFileToAtoms.cpp @@ -253,7 +253,7 @@ void atomFromSymbol(DefinedAtom::ContentType atomType, const Section §ion, ? DefinedAtom::mergeAsWeak : DefinedAtom::mergeNo; bool thumb = (symbolDescFlags & N_ARM_THUMB_DEF); if (atomType == DefinedAtom::typeUnknown) { - // Mach-O needs a segment and section name. Concatentate those two + // Mach-O needs a segment and section name. Concatenate those two // with a / separator (e.g. "seg/sect") to fit into the lld model // of just a section name. std::string segSectName = section.segmentName.str() @@ -326,7 +326,7 @@ llvm::Error processSymboledSection(DefinedAtom::ContentType atomType, return llvm::Error::success(); if (symbols.empty()) { - // Section has no symbols, put all content in one anoymous atom. + // Section has no symbols, put all content in one anonymous atom. atomFromSymbol(atomType, section, file, section.address, StringRef(), 0, Atom::scopeTranslationUnit, section.address + section.content.size(), @@ -471,7 +471,7 @@ llvm::Error processSection(DefinedAtom::ContentType atomType, "is not zero terminated."); } if (customSectionName) { - // Mach-O needs a segment and section name. Concatentate those two + // Mach-O needs a segment and section name. Concatenate those two // with a / separator (e.g. "seg/sect") to fit into the lld model // of just a section name. std::string segSectName = section.segmentName.str() @@ -1460,7 +1460,7 @@ normalizedObjectToAtoms(MachOFile *file, } // Create atoms from undefined symbols. for (auto &sym : normalizedFile.undefinedSymbols) { - // Undefinded symbols with n_value != 0 are actually tentative definitions. + // Undefined symbols with n_value != 0 are actually tentative definitions. if (sym.value == Hex64(0)) { file->addUndefinedAtom(sym.name, copyRefs); } else { diff --git a/lld/lib/ReaderWriter/YAML/ReaderWriterYAML.cpp b/lld/lib/ReaderWriter/YAML/ReaderWriterYAML.cpp index 77936399c1afb8..23c20aa2ba1c62 100644 --- a/lld/lib/ReaderWriter/YAML/ReaderWriterYAML.cpp +++ b/lld/lib/ReaderWriter/YAML/ReaderWriterYAML.cpp @@ -121,7 +121,7 @@ class RefNameBuilder { StringRef newName = copyString(buffer.str()); _refNames[&atom] = newName; DEBUG_WITH_TYPE("WriterYAML", - llvm::dbgs() << "name collsion: creating ref-name: '" + llvm::dbgs() << "name collision: creating ref-name: '" << newName << "' (" << (const void *)newName.data() << ", " << newName.size() << ")\n"); @@ -135,7 +135,7 @@ class RefNameBuilder { StringRef newName2 = copyString(buffer2.str()); _refNames[prevAtom] = newName2; DEBUG_WITH_TYPE("WriterYAML", - llvm::dbgs() << "name collsion: creating ref-name: '" + llvm::dbgs() << "name collision: creating ref-name: '" << newName2 << "' (" << (const void *)newName2.data() << ", " << newName2.size() << ")\n"); diff --git a/lld/test/ELF/aarch64-movw-tprel.s b/lld/test/ELF/aarch64-movw-tprel.s index f2eedf8f1abfd6..dd7eae3b930752 100644 --- a/lld/test/ELF/aarch64-movw-tprel.s +++ b/lld/test/ELF/aarch64-movw-tprel.s @@ -4,7 +4,7 @@ # RUN: llvm-objdump --no-show-raw-insn -d %t | FileCheck %s # RUN: llvm-readobj --symbols %t | FileCheck --check-prefix=CHECK-SYM %s -## Test the the local exec relocations that map to: +## Test the local exec relocations that map to: ## R_AARCH64_TLSLE_MOVW_TPREL_G2 ## R_AARCH64_TLSLE_MOVW_TPREL_G1 ## R_AARCH64_TLSLE_MOVW_TPREL_G1_NC diff --git a/lld/test/ELF/linkerscript/assert.s b/lld/test/ELF/linkerscript/assert.s index b1ca86e848cd1d..eacca25f596793 100644 --- a/lld/test/ELF/linkerscript/assert.s +++ b/lld/test/ELF/linkerscript/assert.s @@ -25,7 +25,7 @@ # RUN: ld.lld -shared -o %t5 --script %t5.script %t1.o # RUN: llvm-readobj %t5 > /dev/null -## Test assertions inside of output section decriptions. +## Test assertions inside of output section descriptions. # RUN: echo "SECTIONS { .foo : { *(.foo) ASSERT(SIZEOF(.foo) == 8, \"true\"); } }" > %t6.script # RUN: ld.lld -shared -o %t6 --script %t6.script %t1.o # RUN: llvm-readobj %t6 > /dev/null diff --git a/lld/test/ELF/ppc64-bsymbolic-toc-restore.s b/lld/test/ELF/ppc64-bsymbolic-toc-restore.s index 929c82cd24b870..6cea18472a5009 100644 --- a/lld/test/ELF/ppc64-bsymbolic-toc-restore.s +++ b/lld/test/ELF/ppc64-bsymbolic-toc-restore.s @@ -15,7 +15,7 @@ # FAIL: call to def lacks nop, can't restore toc # Test to document the toc-restore behavior with -Bsymbolic option. Since -# -Bsymbolic causes the call to bind to the internal defintion we know the +# -Bsymbolic causes the call to bind to the internal definition we know the # caller and callee share the same TOC base. This means branching to the # local entry point of the callee, and no need for a nop to follow the call # (since there is no need to restore the TOC-pointer after the call). diff --git a/lld/test/wasm/export-optional-lazy.ll b/lld/test/wasm/export-optional-lazy.ll index 5662b0b056d960..960e71c6ae6c66 100644 --- a/lld/test/wasm/export-optional-lazy.ll +++ b/lld/test/wasm/export-optional-lazy.ll @@ -1,6 +1,6 @@ ; Optional linker-synthetic symbols are only created if they are undefined ; in the final output. -; This test is for a regression where an explict --export of an lazy archive +; This test is for a regression where an explicit --export of an lazy archive ; symbol caused an undefined referece to an optional symbol to occur *after* ; the optional symbols were created. diff --git a/lld/test/wasm/signature-mismatch-unknown.ll b/lld/test/wasm/signature-mismatch-unknown.ll index 9bd97db50f1f96..b354ed12207da3 100644 --- a/lld/test/wasm/signature-mismatch-unknown.ll +++ b/lld/test/wasm/signature-mismatch-unknown.ll @@ -13,7 +13,7 @@ target triple = "wasm32-unknown-unknown" -; Function declartion with incorrect signature. +; Function declaration with incorrect signature. declare dso_local void @ret32() ; Simply taking the address of the function should *not* generate the diff --git a/lld/wasm/Config.h b/lld/wasm/Config.h index cc4bdc1e3a681f..3b3f2daf576c7d 100644 --- a/lld/wasm/Config.h +++ b/lld/wasm/Config.h @@ -72,7 +72,7 @@ struct Configuration { bool isPic; // The table offset at which to place function addresses. We reserve zero - // for the null function pointer. This gets set to 1 for exectuables and 0 + // for the null function pointer. This gets set to 1 for executables and 0 // for shared libraries (since they always added to a dynamic offset at // runtime). uint32_t tableBase = 0; diff --git a/lld/wasm/InputChunks.h b/lld/wasm/InputChunks.h index 5d4aebd2902cd9..030c9a9dd56193 100644 --- a/lld/wasm/InputChunks.h +++ b/lld/wasm/InputChunks.h @@ -83,7 +83,7 @@ class InputChunk { // Represents a WebAssembly data segment which can be included as part of // an output data segments. Note that in WebAssembly, unlike ELF and other -// formats, used the term "data segment" to refer to the continous regions of +// formats, used the term "data segment" to refer to the continuous regions of // memory that make on the data section. See: // https://webassembly.github.io/spec/syntax/modules.html#syntax-data // @@ -156,7 +156,7 @@ class InputFunction : public InputChunk { // The size of a given input function can depend on the values of the // LEB relocations within it. This finalizeContents method is called after - // all the symbol values have be calcualted but before getSize() is ever + // all the symbol values have be calculated but before getSize() is ever // called. void calculateSize(); diff --git a/lld/wasm/InputFiles.cpp b/lld/wasm/InputFiles.cpp index 74308ff6655cc4..0ea9a37432feb1 100644 --- a/lld/wasm/InputFiles.cpp +++ b/lld/wasm/InputFiles.cpp @@ -299,8 +299,7 @@ void ObjFile::parse(bool ignoreComdats) { customSectionsByIndex[sectionIndex] = customSections.back(); } sectionIndex++; - // Scans relocations to dermine determine if a function symbol is called - // directly + // Scans relocations to determine if a function symbol is called directly. for (const WasmRelocation &reloc : section.Relocations) if (reloc.Type == R_WASM_FUNCTION_INDEX_LEB) isCalledDirectly[reloc.Index] = true; diff --git a/lld/wasm/SymbolTable.cpp b/lld/wasm/SymbolTable.cpp index 14616f961b6dcd..598859d3c987a6 100644 --- a/lld/wasm/SymbolTable.cpp +++ b/lld/wasm/SymbolTable.cpp @@ -203,8 +203,9 @@ DefinedFunction *SymbolTable::addSyntheticFunction(StringRef name, } // Adds an optional, linker generated, data symbols. The symbol will only be -// added if there is an undefine reference to it, or if it is explictly exported -// via the --export flag. Otherwise we don't add the symbol and return nullptr. +// added if there is an undefine reference to it, or if it is explicitly +// exported via the --export flag. Otherwise we don't add the symbol and return +// nullptr. DefinedData *SymbolTable::addOptionalDataSymbol(StringRef name, uint32_t value) { Symbol *s = find(name); @@ -396,7 +397,7 @@ Symbol *SymbolTable::addDefinedEvent(StringRef name, uint32_t flags, // This function get called when an undefined symbol is added, and there is // already an existing one in the symbols table. In this case we check that // custom 'import-module' and 'import-field' symbol attributes agree. -// With LTO these attributes are not avialable when the bitcode is read and only +// With LTO these attributes are not available when the bitcode is read and only // become available when the LTO object is read. In this case we silently // replace the empty attributes with the valid ones. template @@ -533,7 +534,7 @@ void SymbolTable::addLazy(ArchiveFile *file, const Archive::Symbol *sym) { return; // The existing symbol is undefined, load a new one from the archive, - // unless the the existing symbol is weak in which case replace the undefined + // unless the existing symbol is weak in which case replace the undefined // symbols with a LazySymbol. if (s->isWeak()) { const WasmSignature *oldSig = nullptr; @@ -646,7 +647,7 @@ void SymbolTable::handleWeakUndefines() { // It is possible for undefined functions not to have a signature (eg. if // added via "--undefined"), but weak undefined ones do have a signature. // Lazy symbols may not be functions and therefore Sig can still be null - // in some circumstantce. + // in some circumstance. assert(!isa(sym)); continue; } diff --git a/lld/wasm/Symbols.h b/lld/wasm/Symbols.h index 787ce7deae6303..e621dbc8f2734a 100644 --- a/lld/wasm/Symbols.h +++ b/lld/wasm/Symbols.h @@ -148,8 +148,8 @@ class Symbol { // are unreferenced except by other bitcode objects. bool isUsedInRegularObj : 1; - // True if ths symbol is explicity marked for export (i.e. via the -e/--export - // command line flag) + // True if ths symbol is explicitly marked for export (i.e. via the + // -e/--export command line flag) bool forceExport : 1; // False if LTO shouldn't inline whatever this symbol points to. If a symbol