diff --git a/lld/ELF/Arch/PPC64.cpp b/lld/ELF/Arch/PPC64.cpp --- a/lld/ELF/Arch/PPC64.cpp +++ b/lld/ELF/Arch/PPC64.cpp @@ -137,7 +137,7 @@ // When accessing a symbol defined in another translation unit, compilers // reserve a .toc entry, allocate a local label and generate toc-indirect -// instuctions: +// instructions: // // addis 3, 2, .LC0@toc@ha # R_PPC64_TOC16_HA // ld 3, .LC0@toc@l(3) # R_PPC64_TOC16_LO_DS, load the address from a .toc entry diff --git a/lld/ELF/CallGraphSort.cpp b/lld/ELF/CallGraphSort.cpp --- a/lld/ELF/CallGraphSort.cpp +++ b/lld/ELF/CallGraphSort.cpp @@ -263,7 +263,7 @@ // Sort sections by the profile data provided by -callgraph-profile-file // // This first builds a call graph based on the profile data then merges sections -// according to the C³ huristic. All clusters are then sorted by a density +// according to the C³ heuristic. All clusters are then sorted by a density // metric to further improve locality. DenseMap computeCallGraphProfileOrder() { return CallGraphSort().run(); diff --git a/lld/ELF/InputSection.cpp b/lld/ELF/InputSection.cpp --- a/lld/ELF/InputSection.cpp +++ b/lld/ELF/InputSection.cpp @@ -695,7 +695,7 @@ // ftp://www.linux-mips.org/pub/linux/mips/doc/ABI/mipsabi.pdf // microMIPS variants of these relocations use slightly different // expressions: AHL + GP - P + 3 for %lo() and AHL + GP - P - 1 for %hi() - // to correctly handle less-sugnificant bit of the microMIPS symbol. + // to correctly handle less-significant bit of the microMIPS symbol. uint64_t v = in.mipsGot->getGp(file) + a - p; if (type == R_MIPS_LO16 || type == R_MICROMIPS_LO16) v += 4; diff --git a/lld/ELF/ScriptLexer.cpp b/lld/ELF/ScriptLexer.cpp --- a/lld/ELF/ScriptLexer.cpp +++ b/lld/ELF/ScriptLexer.cpp @@ -187,7 +187,7 @@ break; } - // Get a token before the opreator. + // Get a token before the operator. if (e != 0) ret.push_back(s.substr(0, e)); diff --git a/lld/ELF/SyntheticSections.h b/lld/ELF/SyntheticSections.h --- a/lld/ELF/SyntheticSections.h +++ b/lld/ELF/SyntheticSections.h @@ -364,7 +364,7 @@ // Try to merge two GOTs. In case of success the `Dst` contains // result of merging and the function returns true. In case of - // ovwerflow the `Dst` is unchanged and the function returns false. + // overflow the `Dst` is unchanged and the function returns false. bool tryMergeGots(FileGot & dst, FileGot & src, bool isPrimary); }; diff --git a/lld/ELF/SyntheticSections.cpp b/lld/ELF/SyntheticSections.cpp --- a/lld/ELF/SyntheticSections.cpp +++ b/lld/ELF/SyntheticSections.cpp @@ -2149,7 +2149,7 @@ eSym->st_size = sym->getSize(); // st_value is usually an address of a symbol, but that has a - // special meaining for uninstantiated common symbols (this can + // special meaning for uninstantiated common symbols (this can // occur if -r is given). if (BssSection *commonSec = getCommonSec(ent.sym)) eSym->st_value = commonSec->alignment; @@ -2248,7 +2248,7 @@ // DSOs. That means resolving all dynamic symbols takes O(m)*O(n) // where m is the number of DSOs and n is the number of dynamic // symbols. For modern large programs, both m and n are large. So -// making each step faster by using hash tables substiantially +// making each step faster by using hash tables substantially // improves time to load programs. // // (Note that this is not the only way to design the shared library. diff --git a/lld/include/lld/Core/Reference.h b/lld/include/lld/Core/Reference.h --- a/lld/include/lld/Core/Reference.h +++ b/lld/include/lld/Core/Reference.h @@ -91,7 +91,7 @@ /// Some relocations require a symbol and a value (e.g. foo + 4). virtual Addend addend() const = 0; - /// During linking, some optimzations may change addend value. + /// During linking, some optimizations may change addend value. virtual void setAddend(Addend) = 0; /// Returns target specific attributes of the reference. diff --git a/lld/lib/ReaderWriter/MachO/ArchHandler_arm64.cpp b/lld/lib/ReaderWriter/MachO/ArchHandler_arm64.cpp --- a/lld/lib/ReaderWriter/MachO/ArchHandler_arm64.cpp +++ b/lld/lib/ReaderWriter/MachO/ArchHandler_arm64.cpp @@ -61,7 +61,7 @@ /// Used by GOTPass to update GOT References. void updateReferenceToGOT(const Reference *ref, bool targetNowGOT) override { - // If GOT slot was instanciated, transform: + // If GOT slot was instantiated, transform: // gotPage21/gotOffset12 -> page21/offset12scale8 // If GOT slot optimized away, transform: // gotPage21/gotOffset12 -> page21/addOffset12 diff --git a/lld/lib/ReaderWriter/MachO/CompactUnwindPass.cpp b/lld/lib/ReaderWriter/MachO/CompactUnwindPass.cpp --- a/lld/lib/ReaderWriter/MachO/CompactUnwindPass.cpp +++ b/lld/lib/ReaderWriter/MachO/CompactUnwindPass.cpp @@ -576,5 +576,5 @@ pm.add(std::make_unique(ctx)); } -} // end namesapce mach_o -} // end namesapce lld +} // end namespace mach_o +} // end namespace lld diff --git a/lld/lib/ReaderWriter/MachO/GOTPass.cpp b/lld/lib/ReaderWriter/MachO/GOTPass.cpp --- a/lld/lib/ReaderWriter/MachO/GOTPass.cpp +++ b/lld/lib/ReaderWriter/MachO/GOTPass.cpp @@ -179,5 +179,5 @@ pm.add(std::make_unique(ctx)); } -} // end namesapce mach_o -} // end namesapce lld +} // end namespace mach_o +} // end namespace lld diff --git a/lld/lib/ReaderWriter/MachO/TLVPass.cpp b/lld/lib/ReaderWriter/MachO/TLVPass.cpp --- a/lld/lib/ReaderWriter/MachO/TLVPass.cpp +++ b/lld/lib/ReaderWriter/MachO/TLVPass.cpp @@ -136,5 +136,5 @@ pm.add(std::make_unique(ctx)); } -} // end namesapce mach_o -} // end namesapce lld +} // end namespace mach_o +} // end namespace lld diff --git a/lld/test/COFF/secidx-absolute.s b/lld/test/COFF/secidx-absolute.s --- a/lld/test/COFF/secidx-absolute.s +++ b/lld/test/COFF/secidx-absolute.s @@ -3,7 +3,7 @@ # RUN: lld-link -entry:main -nodefaultlib %t.obj -out:%t.exe # RUN: llvm-readobj %t.exe -sections -section-data | FileCheck %s -# Section relocations against absolute symbols resolve to the last real ouput +# Section relocations against absolute symbols resolve to the last real output # section index plus one. .text diff --git a/lld/test/ELF/Inputs/undef-bad-debug.s b/lld/test/ELF/Inputs/undef-bad-debug.s --- a/lld/test/ELF/Inputs/undef-bad-debug.s +++ b/lld/test/ELF/Inputs/undef-bad-debug.s @@ -14,7 +14,7 @@ .long .Lprologue_end - .Lprologue_start # prologue length .Lprologue_start: .byte 1 # minimum instruction length - .byte 1 # maximum operatiosn per instruction + .byte 1 # maximum operations per instruction .byte 1 # default is_stmt .byte -5 # line base .byte 14 # line range @@ -51,7 +51,7 @@ .long .Lprologue2_end - .Lprologue2_start # prologue length .Lprologue2_start: .byte 1 # minimum instruction length - .byte 1 # maximum operatiosn per instruction + .byte 1 # maximum operations per instruction .byte 1 # default is_stmt .byte -5 # line base .byte 14 # line range diff --git a/lld/test/ELF/allow-multiple-definition.s b/lld/test/ELF/allow-multiple-definition.s --- a/lld/test/ELF/allow-multiple-definition.s +++ b/lld/test/ELF/allow-multiple-definition.s @@ -14,7 +14,7 @@ # RUN: llvm-objdump -d %t3 | FileCheck %s # RUN: llvm-objdump -d %t4 | FileCheck -check-prefix=REVERT %s -# inputs contain different constants for instuction movl. +# inputs contain different constants for instruction movl. # Tests below checks that order of files in command line # affects on what symbol will be used. # If flag allow-multiple-definition is enabled the first diff --git a/lld/test/ELF/arm-exidx-add-missing.s b/lld/test/ELF/arm-exidx-add-missing.s --- a/lld/test/ELF/arm-exidx-add-missing.s +++ b/lld/test/ELF/arm-exidx-add-missing.s @@ -10,7 +10,7 @@ // The range of addresses covered by the table entry is terminated by the // next table entry. This means that an executable section without a .ARM.exidx // section does not terminate the range of addresses. To fix this the linker -// synthesises an EXIDX_CANTUNWIND entry for each section wihout a .ARM.exidx +// synthesises an EXIDX_CANTUNWIND entry for each section without a .ARM.exidx // section. .syntax unified diff --git a/lld/test/ELF/executable-undefined-ignoreall.s b/lld/test/ELF/executable-undefined-ignoreall.s --- a/lld/test/ELF/executable-undefined-ignoreall.s +++ b/lld/test/ELF/executable-undefined-ignoreall.s @@ -1,7 +1,7 @@ # REQUIRES: x86 ## --unresolved-symbols=ignore-all behaves similar to -shared: -## for PLT relocations to undefined symbols, produce dynamic reloctions if we +## for PLT relocations to undefined symbols, produce dynamic relocations if we ## emit .dynsym. # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o diff --git a/lld/test/ELF/icf-absolute2.s b/lld/test/ELF/icf-absolute2.s --- a/lld/test/ELF/icf-absolute2.s +++ b/lld/test/ELF/icf-absolute2.s @@ -4,7 +4,7 @@ # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %S/Inputs/icf-absolute2.s -o %t2 # RUN: ld.lld %t %t2 -o /dev/null --icf=all --print-icf-sections | FileCheck -allow-empty %s -## Test we do not crash and do not fold sections which relocations reffering to +## Test we do not crash and do not fold sections which relocations referring to ## absolute symbols with a different values. # CHECK-NOT: selected diff --git a/lld/test/ELF/invalid/broken-relaxation-x64.test b/lld/test/ELF/invalid/broken-relaxation-x64.test --- a/lld/test/ELF/invalid/broken-relaxation-x64.test +++ b/lld/test/ELF/invalid/broken-relaxation-x64.test @@ -8,7 +8,7 @@ ## YAML below contains 2 relocations of type R_X86_64_GOTTPOFF, and a .text ## with fake content filled by 0xFF. That means instructions for relaxation are ## "broken", so they does not match any known valid relaxations. We also generate -## .tls section because we need it for correct proccessing of STT_TLS symbol. +## .tls section because we need it for correct processing of STT_TLS symbol. !ELF FileHeader: Class: ELFCLASS64 @@ -44,4 +44,4 @@ Value: 0x12345 Size: 4 Binding: STB_GLOBAL - \ No newline at end of file + diff --git a/lld/test/ELF/linkerscript/align1.test b/lld/test/ELF/linkerscript/align1.test --- a/lld/test/ELF/linkerscript/align1.test +++ b/lld/test/ELF/linkerscript/align1.test @@ -34,7 +34,7 @@ # RUN: ld.lld -o %t5 --script %t.script %t.o # RUN: llvm-objdump -section-headers %t5 | FileCheck %s -check-prefix=ZERO -## Test we fail gracefuly when alignment value is not a power of 2 (#1). +## Test we fail gracefully when alignment value is not a power of 2 (#1). # RUN: echo "SECTIONS { . = 0x123; . = ALIGN(0x123, 3); .aaa : { *(.aaa) } }" > %t.script # RUN: not ld.lld -o %t6 --script %t.script %t.o 2>&1 | FileCheck -check-prefix=ERR %s diff --git a/lld/test/ELF/linkerscript/subalign.s b/lld/test/ELF/linkerscript/subalign.s --- a/lld/test/ELF/linkerscript/subalign.s +++ b/lld/test/ELF/linkerscript/subalign.s @@ -34,7 +34,7 @@ # RUN: ld.lld %t1.o --script %t4.script -o %t4 # RUN: llvm-objdump -s %t4 | FileCheck -check-prefix=SUBALIGN %s -## Test we fail gracefuly when alignment value is not a power of 2. +## Test we fail gracefully when alignment value is not a power of 2. # RUN: echo "SECTIONS { .aaa : SUBALIGN(3) { *(.aaa*) } }" > %t5.script # RUN: not ld.lld %t1.o --script %t5.script -o /dev/null 2>&1 | FileCheck --check-prefix=ERR2 %s # ERR2: {{.*}}.script:1: alignment must be power of 2 diff --git a/lld/test/ELF/lto/common4.ll b/lld/test/ELF/lto/common4.ll --- a/lld/test/ELF/lto/common4.ll +++ b/lld/test/ELF/lto/common4.ll @@ -2,7 +2,7 @@ ;; Make sure that common symbols are properly internalized. ;; In this file, @a does not interpose any symbol in a DSO, -;; so LTO should be able to internelize it. +;; so LTO should be able to internalize it. ; RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux /dev/null -o %t.so.o ; RUN: ld.lld -shared -o %t.so %t.so.o diff --git a/lld/test/ELF/mips-sto-pic-flag.s b/lld/test/ELF/mips-sto-pic-flag.s --- a/lld/test/ELF/mips-sto-pic-flag.s +++ b/lld/test/ELF/mips-sto-pic-flag.s @@ -1,7 +1,7 @@ # REQUIRES: mips # In case of linking PIC and non-PIC code together and generation # of a relocatable object, all PIC symbols should have STO_MIPS_PIC -# flag in the symbol table of the ouput file. +# flag in the symbol table of the output file. # RUN: llvm-mc -filetype=obj -triple=mips-unknown-linux %s -o %t-npic.o # RUN: llvm-mc -filetype=obj -triple=mips-unknown-linux \ diff --git a/lld/test/ELF/pack-dyn-relocs.s b/lld/test/ELF/pack-dyn-relocs.s --- a/lld/test/ELF/pack-dyn-relocs.s +++ b/lld/test/ELF/pack-dyn-relocs.s @@ -69,7 +69,7 @@ // ANDROID32-HEADERS: 0x6000000F ANDROID_REL [[ADDR]] // ANDROID32-HEADERS: 0x60000010 ANDROID_RELSZ [[SIZE]] -// Packed should have the groups of non-relative reloations first, followed +// Packed should have the groups of non-relative relocations first, followed // by the larger groups of relative relocations (i.e. the 8 and 9 followed // by the 7.) // ANDROID32: Section ({{.+}}) .rel.dyn { diff --git a/lld/test/ELF/ppc64-local-dynamic.s b/lld/test/ELF/ppc64-local-dynamic.s --- a/lld/test/ELF/ppc64-local-dynamic.s +++ b/lld/test/ELF/ppc64-local-dynamic.s @@ -95,7 +95,7 @@ // OutputRelocs-NEXT: Offset Info Type Symbol's Value Symbol's Name + Addend // OutputRelocs-NEXT: R_PPC64_DTPMOD64 -// Check that the got has 3 entries, 1 for the TOC and 1 stucture of 2 entries +// Check that the got has 3 entries, 1 for the TOC and 1 structure of 2 entries // for the tls variables. Also verify the address so we can check the offsets // we calculate for each relocation type. // CheckGot: got 00000018 0000000000020100 diff --git a/lld/test/ELF/ppc64-split-stack-prologue-adjust-success.s b/lld/test/ELF/ppc64-split-stack-prologue-adjust-success.s --- a/lld/test/ELF/ppc64-split-stack-prologue-adjust-success.s +++ b/lld/test/ELF/ppc64-split-stack-prologue-adjust-success.s @@ -16,7 +16,7 @@ # A caller with a stack that is small enough that the addis instruction # from the split-stack prologue is unneeded, and after the prologue adjustment -# the stack size still fits whithin 16 bits. +# the stack size still fits within 16 bits. .p2align 2 .global caller_small_stack .type caller_small_stack, @function @@ -56,7 +56,7 @@ # CHECK-NEXT: cmpld 7, 12, 0 # CHECK-NEXT: bt- 28, .+36 -# A caller that has a stack size that fits whithin 16 bits, but the adjusted +# A caller that has a stack size that fits within 16 bits, but the adjusted # stack size after prologue adjustment now overflows 16 bits needing both addis # and addi instructions. .p2align 2 diff --git a/lld/test/ELF/warn-backrefs.s b/lld/test/ELF/warn-backrefs.s --- a/lld/test/ELF/warn-backrefs.s +++ b/lld/test/ELF/warn-backrefs.s @@ -39,7 +39,7 @@ # RUN: echo ".globl foo; foo: call bar" | llvm-mc -filetype=obj -triple=x86_64-unknown-linux - -o %t4.o # RUN: ld.lld --fatal-warnings --warn-backrefs %t1.o --start-lib %t3.o %t4.o --end-lib -o /dev/null -# We don't report backward references to weak symbols as they can be overriden later. +# We don't report backward references to weak symbols as they can be overridden later. # RUN: echo ".weak foo; foo:" | llvm-mc -filetype=obj -triple=x86_64-unknown-linux - -o %t5.o # RUN: ld.lld --fatal-warnings --warn-backrefs --start-lib %t5.o --end-lib %t1.o %t2.o -o /dev/null diff --git a/lld/test/mach-o/error-simulator-vs-macosx.yaml b/lld/test/mach-o/error-simulator-vs-macosx.yaml --- a/lld/test/mach-o/error-simulator-vs-macosx.yaml +++ b/lld/test/mach-o/error-simulator-vs-macosx.yaml @@ -1,7 +1,7 @@ # RUN: ld64.lld -arch i386 -macosx_version_min 10.8 %s %p/Inputs/hello-world-x86.yaml -o %t && llvm-nm -m %t | FileCheck %s # RUN: not ld64.lld -arch i386 -ios_simulator_version_min 5.0 %s %p/Inputs/hello-world-x86.yaml -o %t 2>&1 | FileCheck %s --check-prefix=ERROR # -# Test that i386 can link with a macos version but gives an error with a simululator version. +# Test that i386 can link with a macos version but gives an error with a simulator version. # --- !mach-o diff --git a/lld/test/mach-o/parse-literals-error.yaml b/lld/test/mach-o/parse-literals-error.yaml --- a/lld/test/mach-o/parse-literals-error.yaml +++ b/lld/test/mach-o/parse-literals-error.yaml @@ -1,7 +1,7 @@ # RUN: not ld64.lld -arch x86_64 -r -print_atoms %s -o %t 2> %t.err # RUN: FileCheck %s < %t.err # -# Test for error if literal section is not correct size mulitple. +# Test for error if literal section is not correct size multiple. # --- !mach-o diff --git a/lld/test/wasm/entry-signature.ll b/lld/test/wasm/entry-signature.ll --- a/lld/test/wasm/entry-signature.ll +++ b/lld/test/wasm/entry-signature.ll @@ -1,4 +1,4 @@ -; Verify that the entry point signauture can be flexible. +; Verify that the entry point signature can be flexible. ; RUN: llc -filetype=obj %s -o %t.o ; RUN: wasm-ld -o %t1.wasm %t.o diff --git a/lld/test/wasm/export-optional-lazy.ll b/lld/test/wasm/export-optional-lazy.ll --- a/lld/test/wasm/export-optional-lazy.ll +++ b/lld/test/wasm/export-optional-lazy.ll @@ -1,7 +1,7 @@ ; Optional linker-synthetic symbols are only created if they are undefined ; in the final output. ; 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* +; symbol caused an undefined reference to an optional symbol to occur *after* ; the optional symbols were created. ; RUN: llc -filetype=obj %s -o %t.o diff --git a/lld/test/wasm/lto/signature-mismatch.ll b/lld/test/wasm/lto/signature-mismatch.ll --- a/lld/test/wasm/lto/signature-mismatch.ll +++ b/lld/test/wasm/lto/signature-mismatch.ll @@ -3,7 +3,7 @@ ; RUN: not wasm-ld --fatal-warnings %t.o %t1.o -o %t.wasm 2>&1 | FileCheck %s ; Test that functions defined in bitcode correctly report signature -; mistmaches with existing undefined sybmols in normal objects. +; mismatches with existing undefined sybmols in normal objects. target triple = "wasm32-unknown-unknown" diff --git a/lld/test/wasm/lto/undef.ll b/lld/test/wasm/lto/undef.ll --- a/lld/test/wasm/lto/undef.ll +++ b/lld/test/wasm/lto/undef.ll @@ -8,7 +8,7 @@ declare i32 @bar() ; Symbols such as foo which are only called indirectly are handled slightly -; differently with resepect to signature checking. +; differently with respect to signature checking. declare i32 @foo() @ptr = global i8* bitcast (i32 ()* @foo to i8*), align 8 diff --git a/lld/test/wasm/signature-mismatch-unknown.ll b/lld/test/wasm/signature-mismatch-unknown.ll --- a/lld/test/wasm/signature-mismatch-unknown.ll +++ b/lld/test/wasm/signature-mismatch-unknown.ll @@ -4,7 +4,7 @@ ; RUN: wasm-ld --fatal-warnings -o %t.wasm %t.main.o %t.ret32.o ; Also test the case where there are two different object files that contains -; referneces ret32: +; references ret32: ; %t.main.o: Does not call ret32 directly; used the wrong signature. ; %t.call-ret32.o: Calls ret32 directly; uses the correct signature. ; RUN: llc -filetype=obj %p/Inputs/call-ret32.ll -o %t.call-ret32.o diff --git a/lld/test/wasm/undefined-entry.test b/lld/test/wasm/undefined-entry.test --- a/lld/test/wasm/undefined-entry.test +++ b/lld/test/wasm/undefined-entry.test @@ -3,7 +3,7 @@ RUN: not wasm-ld --allow-undefined -o %t.wasm %t.ret32.o 2>&1 | FileCheck %s RUN: not wasm-ld -entry=foo -o %t.wasm %t.ret32.o 2>&1 | FileCheck %s -check-prefix=CHECK-CUSTOM -CHECK: error: entry symbol not defined (pass --no-entry to supress): _start -CHECK-CUSTOM: error: entry symbol not defined (pass --no-entry to supress): foo +CHECK: error: entry symbol not defined (pass --no-entry to suppress): _start +CHECK-CUSTOM: error: entry symbol not defined (pass --no-entry to suppress): foo RUN: wasm-ld --no-entry -o %t.wasm %t.ret32.o diff --git a/lld/test/wasm/visibility-hidden.ll b/lld/test/wasm/visibility-hidden.ll --- a/lld/test/wasm/visibility-hidden.ll +++ b/lld/test/wasm/visibility-hidden.ll @@ -3,12 +3,12 @@ ; RUN: rm -f %t2.a ; RUN: llvm-ar rcs %t2.a %t2.o -; Test that symbols with hidden visitiblity are not export, even with +; Test that symbols with hidden visibility are not export, even with ; --export-dynamic ; RUN: wasm-ld --export-dynamic %t.o %t2.a -o %t.wasm ; RUN: obj2yaml %t.wasm | FileCheck %s -; Test that symbols with default visitiblity are not exported without +; Test that symbols with default visibility are not exported without ; --export-dynamic ; RUN: wasm-ld %t.o %t2.a -o %t.nodef.wasm ; RUN: obj2yaml %t.nodef.wasm | FileCheck %s -check-prefix=NO-DEFAULT diff --git a/lld/wasm/Driver.cpp b/lld/wasm/Driver.cpp --- a/lld/wasm/Driver.cpp +++ b/lld/wasm/Driver.cpp @@ -742,7 +742,7 @@ if (entrySym && entrySym->isDefined()) entrySym->forceExport = true; else - error("entry symbol not defined (pass --no-entry to supress): " + + error("entry symbol not defined (pass --no-entry to suppress): " + config->entry); } diff --git a/lld/wasm/SymbolTable.h b/lld/wasm/SymbolTable.h --- a/lld/wasm/SymbolTable.h +++ b/lld/wasm/SymbolTable.h @@ -103,7 +103,7 @@ llvm::DenseMap symMap; std::vector symVector; - // For certain symbols types, e.g. function symbols, we allow for muliple + // For certain symbols types, e.g. function symbols, we allow for multiple // variants of the same symbol with different signatures. llvm::DenseMap> symVariants; diff --git a/lld/wasm/SymbolTable.cpp b/lld/wasm/SymbolTable.cpp --- a/lld/wasm/SymbolTable.cpp +++ b/lld/wasm/SymbolTable.cpp @@ -135,7 +135,7 @@ } // Check the type of new symbol matches that of the symbol is replacing. -// Returns true if the function types match, false is there is a singature +// Returns true if the function types match, false is there is a signature // mismatch. static bool signatureMatches(FunctionSymbol *existing, const WasmSignature *newSig) { @@ -276,7 +276,7 @@ std::tie(s, wasInserted) = insert(name, file); auto replaceSym = [&](Symbol *sym) { - // If the new defined function doesn't have signture (i.e. bitcode + // If the new defined function doesn't have signature (i.e. bitcode // functions) but the old symbol does, then preserve the old signature const WasmSignature *oldSig = s->getSignature(); auto* newSym = replaceSymbol(sym, name, flags, file, function); diff --git a/lld/wasm/Symbols.h b/lld/wasm/Symbols.h --- a/lld/wasm/Symbols.h +++ b/lld/wasm/Symbols.h @@ -414,7 +414,7 @@ // Lazy symbols can have a signature because they can replace an // UndefinedFunction which which case we need to be able to preserve the - // signture. + // signature. // TODO(sbc): This repetition of the signature field is inelegant. Revisit // the use of class hierarchy to represent symbol taxonomy. const WasmSignature *signature = nullptr; diff --git a/lld/wasm/Symbols.cpp b/lld/wasm/Symbols.cpp --- a/lld/wasm/Symbols.cpp +++ b/lld/wasm/Symbols.cpp @@ -152,7 +152,7 @@ LLVM_DEBUG(dbgs() << "setGOTIndex " << name << " -> " << index << "\n"); assert(gotIndex == INVALID_INDEX); if (config->isPic) { - // Any symbol that is assigned a GOT entry must be exported othewise the + // Any symbol that is assigned a GOT entry must be exported otherwise the // dynamic linker won't be able create the entry that contains it. forceExport = true; }