[lld] 7ae3d33 - [lld] Fix trivial typos in comments

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 6 10:25:59 PST 2020


Author: Kazuaki Ishizaki
Date: 2020-01-06T10:25:48-08:00
New Revision: 7ae3d335467a24faa80ebd9b31446c649570ca0c

URL: https://github.com/llvm/llvm-project/commit/7ae3d335467a24faa80ebd9b31446c649570ca0c
DIFF: https://github.com/llvm/llvm-project/commit/7ae3d335467a24faa80ebd9b31446c649570ca0c.diff

LOG: [lld] Fix trivial typos in comments

Reviewed By: ruiu, MaskRay

Differential Revision: https://reviews.llvm.org/D72196

Added: 
    

Modified: 
    lld/Common/Filesystem.cpp
    lld/ELF/Arch/X86.cpp
    lld/ELF/ICF.cpp
    lld/ELF/InputFiles.cpp
    lld/ELF/InputSection.cpp
    lld/ELF/OutputSections.cpp
    lld/docs/WebAssembly.rst
    lld/docs/windows_support.rst
    lld/include/lld/Core/Atom.h
    lld/include/lld/Core/Instrumentation.h
    lld/include/lld/Core/Reference.h
    lld/include/lld/ReaderWriter/MachOLinkingContext.h
    lld/lib/Core/Resolver.cpp
    lld/lib/Driver/DarwinLdDriver.cpp
    lld/lib/ReaderWriter/MachO/CompactUnwindPass.cpp
    lld/lib/ReaderWriter/MachO/File.h
    lld/lib/ReaderWriter/MachO/GOTPass.cpp
    lld/lib/ReaderWriter/MachO/MachOLinkingContext.cpp
    lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryWriter.cpp
    lld/lib/ReaderWriter/MachO/MachONormalizedFileToAtoms.cpp
    lld/lib/ReaderWriter/YAML/ReaderWriterYAML.cpp
    lld/test/ELF/aarch64-movw-tprel.s
    lld/test/ELF/linkerscript/assert.s
    lld/test/ELF/ppc64-bsymbolic-toc-restore.s
    lld/test/wasm/export-optional-lazy.ll
    lld/test/wasm/signature-mismatch-unknown.ll
    lld/wasm/Config.h
    lld/wasm/InputChunks.h
    lld/wasm/InputFiles.cpp
    lld/wasm/SymbolTable.cpp
    lld/wasm/Symbols.h

Removed: 
    


################################################################################
diff  --git a/lld/Common/Filesystem.cpp b/lld/Common/Filesystem.cpp
index c3d3f998f03b..75e88dbce1ab 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 1e8a10cfce7a..c85684b5acdb 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 at GOT or
     // foo at GOT(%ebx).

diff  --git a/lld/ELF/ICF.cpp b/lld/ELF/ICF.cpp
index 5e38066f45ba..8992b6564a8a 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
 //    
diff erent relocation targets are put into 
diff erent 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 04bad8ef4efd..43978cd66c61 100644
--- a/lld/ELF/InputFiles.cpp
+++ b/lld/ELF/InputFiles.cpp
@@ -296,7 +296,7 @@ Optional<DILineInfo> ObjFile<ELFT>::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 25375ea2a574..aab272f53a73 100644
--- a/lld/ELF/InputSection.cpp
+++ b/lld/ELF/InputSection.cpp
@@ -421,7 +421,7 @@ void InputSection::copyRelocations(uint8_t *buf, ArrayRef<RelTy> rels) {
       p->r_addend = getAddend<ELFT>(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 8d328626b85f..6142cb0783ce 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 92bae2aea32c..7f4a688140fd 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 c9723c42fcc8..620040ee8196 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 4d3d27a2af57..d89792d84d1c 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 602a37aff57c..e0b1145fe4e9 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 191e0f07ec38..4769882cde50 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 a950fd5b18e5..cd57604fa17d 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 88119130852c..d1c3d8159f58 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 10e0aa3d9fee..062e945bbd83 100644
--- a/lld/lib/Driver/DarwinLdDriver.cpp
+++ b/lld/lib/Driver/DarwinLdDriver.cpp
@@ -788,7 +788,7 @@ bool parse(llvm::ArrayRef<const char *> 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<const char *> 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<const char *> 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<const char *> 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 44e6a29a0b60..94a105a6f159 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<uint32_t> 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 1cc1c4109dce..072702973f81 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 &section,
                                             uint64_t offsetInSect,

diff  --git a/lld/lib/ReaderWriter/MachO/GOTPass.cpp b/lld/lib/ReaderWriter/MachO/GOTPass.cpp
index 514dd4e09da8..0f80dfa19d09 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 221d895a40d0..0be1c10a7ab0 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 
diff ernent ABIs.  Be nice and allow one export list work for
+    // ObjC has two 
diff erent 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 ab7ea7e07f23..17b45b9ca827 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 6f294b1ecd0f..3347bb13508e 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 &section,
                               ? 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 77936399c1af..23c20aa2ba1c 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 f2eedf8f1abf..dd7eae3b9307 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 b1ca86e848cd..eacca25f5967 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 929c82cd24b8..6cea18472a50 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 5662b0b056d9..960e71c6ae6c 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 9bd97db50f1f..b354ed12207d 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 cc4bdc1e3a68..3b3f2daf576c 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 5d4aebd2902c..030c9a9dd561 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 74308ff6655c..0ea9a37432fe 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 14616f961b6d..598859d3c987 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 <typename T>
@@ -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<FunctionSymbol>(sym));
       continue;
     }

diff  --git a/lld/wasm/Symbols.h b/lld/wasm/Symbols.h
index 787ce7deae63..e621dbc8f273 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


        


More information about the llvm-commits mailing list