From 5dbd8faad52d0807e9913d412e2cb21d68ac30d1 Mon Sep 17 00:00:00 2001 From: Gabriel Ravier Date: Tue, 2 Aug 2022 09:52:31 -0400 Subject: [PATCH] [lld] Fixed a number of typos I went over the output of the following mess of a command: `(ulimit -m 2000000; ulimit -v 2000000; git ls-files -z | parallel --xargs -0 cat | aspell list --mode=none --ignore-case | grep -E '^[A-Za-z][a-z]*$' | sort | uniq -c | sort -n | grep -vE '.{25}' | aspell pipe -W3 | grep : | cut -d' ' -f2 | less)` and proceeded to spend a few days looking at it to find probable typos and fixed a few hundred of them in all of the llvm project (note, the ones I found are not anywhere near all of them, but it seems like a good start). Differential Revision: https://reviews.llvm.org/D130982 --- lld/ELF/Driver.cpp | 2 +- lld/ELF/InputFiles.cpp | 2 +- lld/ELF/InputSection.cpp | 2 +- lld/MachO/Options.td | 2 +- lld/test/ELF/common-archive-lookup.s | 2 +- lld/test/ELF/init-fini.s | 2 +- lld/test/ELF/lto/duplicated-name.ll | 2 +- lld/test/MachO/tools/generate-cfi-funcs.py | 4 ++-- lld/test/MachO/tools/generate-thunkable-program.py | 2 +- lld/test/wasm/debuginfo-undefined-global.s | 2 +- 10 files changed, 11 insertions(+), 11 deletions(-) diff --git a/lld/ELF/Driver.cpp b/lld/ELF/Driver.cpp index 7cd8b2432c73..e0007846cbea 100644 --- a/lld/ELF/Driver.cpp +++ b/lld/ELF/Driver.cpp @@ -2334,7 +2334,7 @@ static void checkAndReportMissingFeature(StringRef config, uint32_t features, } } -// To enable CET (x86's hardware-assited control flow enforcement), each +// To enable CET (x86's hardware-assisted control flow enforcement), each // source file must be compiled with -fcf-protection. Object files compiled // with the flag contain feature flags indicating that they are compatible // with CET. We enable the feature only when all object files are compatible diff --git a/lld/ELF/InputFiles.cpp b/lld/ELF/InputFiles.cpp index 4c796a7178b7..70436805ea79 100644 --- a/lld/ELF/InputFiles.cpp +++ b/lld/ELF/InputFiles.cpp @@ -972,7 +972,7 @@ InputSectionBase *ObjFile::createInputSection(uint32_t idx, return &InputSection::discarded; } - // An object file cmpiled for split stack, but where some of the + // An object file compiled for split stack, but where some of the // functions were compiled with the no_split_stack_attribute will // include a .note.GNU-no-split-stack section. if (name == ".note.GNU-no-split-stack") { diff --git a/lld/ELF/InputSection.cpp b/lld/ELF/InputSection.cpp index 4e0c1a9c9789..57bb48561dba 100644 --- a/lld/ELF/InputSection.cpp +++ b/lld/ELF/InputSection.cpp @@ -921,7 +921,7 @@ void InputSection::relocateNonAlloc(uint8_t *buf, ArrayRef rels) { // at runtime, the notion of PC-relative doesn't make sense here. So, // this is a usage error. However, GNU linkers historically accept such // relocations without any errors and relocate them as if they were at - // address 0. For bug-compatibilty, we accept them with warnings. We + // address 0. For bug-compatibility, we accept them with warnings. We // know Steel Bank Common Lisp as of 2018 have this bug. warn(msg); target.relocateNoSym( diff --git a/lld/MachO/Options.td b/lld/MachO/Options.td index 064862fb1bb0..d97d72a118bb 100644 --- a/lld/MachO/Options.td +++ b/lld/MachO/Options.td @@ -323,7 +323,7 @@ def no_branch_islands : Flag<["-"], "no_branch_islands">, Flags<[HelpHidden]>, Group; def no_deduplicate : Flag<["-"], "no_deduplicate">, - HelpText<"Disable code deduplicaiton (synonym for `--icf=none')">, + HelpText<"Disable code deduplication (synonym for `--icf=none')">, Alias, AliasArgs<["none"]>, Group; diff --git a/lld/test/ELF/common-archive-lookup.s b/lld/test/ELF/common-archive-lookup.s index 0e073591491a..30c8678350ee 100644 --- a/lld/test/ELF/common-archive-lookup.s +++ b/lld/test/ELF/common-archive-lookup.s @@ -91,7 +91,7 @@ # NFC-NEXT: Other: 0 # NFC-NEXT: Section: .bss -## Expecting the strong definition from the object file, and the defintions from +## Expecting the strong definition from the object file, and the definitions from ## the archive do not interfere. # TEST2-LABEL: Disassembly of section .data: # TEST2: : diff --git a/lld/test/ELF/init-fini.s b/lld/test/ELF/init-fini.s index a07d4e3122c4..dbfb48f49026 100644 --- a/lld/test/ELF/init-fini.s +++ b/lld/test/ELF/init-fini.s @@ -47,7 +47,7 @@ // NOENTRY: ] // Should not add entries for "_init" and "_fini" to the symbol table -// if the symbols are defined in non-fetched achive members. +// if the symbols are defined in non-fetched archive members. // RUN: rm -f %t.a // RUN: llvm-ar rcs %t.a %t // RUN: ld.lld -shared -m elf_x86_64 -e _unknown %t.a -o %t.so diff --git a/lld/test/ELF/lto/duplicated-name.ll b/lld/test/ELF/lto/duplicated-name.ll index 0a6dce55bca7..5634fbfb3abd 100644 --- a/lld/test/ELF/lto/duplicated-name.ll +++ b/lld/test/ELF/lto/duplicated-name.ll @@ -1,5 +1,5 @@ ; REQUIRES: x86 -; Cretae two archive with the same member name +; Create two archive with the same member name ; RUN: rm -f %t1.a %t2.a ; RUN: opt -module-summary %s -o %t.o ; RUN: llvm-ar rcS %t1.a %t.o diff --git a/lld/test/MachO/tools/generate-cfi-funcs.py b/lld/test/MachO/tools/generate-cfi-funcs.py index c8af2c4876f4..3f22008349f4 100755 --- a/lld/test/MachO/tools/generate-cfi-funcs.py +++ b/lld/test/MachO/tools/generate-cfi-funcs.py @@ -67,7 +67,7 @@ Lexception%d: return func_size def random_seed(): - """Generate a seed that can easily be passsed back in via --seed=STRING""" + """Generate a seed that can easily be passed back in via --seed=STRING""" return ''.join(random.choice(string.ascii_lowercase) for i in range(10)) def main(): @@ -82,7 +82,7 @@ size = 4 KiB. Use --pages=N or --functions=N to control the size of the output. Default is --pages=2, meaning produce at least two full pages of -compact unwind entries, plus some more. The calculatation is sloppy. +compact unwind entries, plus some more. The calculation is sloppy. """) parser.add_argument('--seed', type=str, default=random_seed(), help='Seed the random number generator') diff --git a/lld/test/MachO/tools/generate-thunkable-program.py b/lld/test/MachO/tools/generate-thunkable-program.py index 5466994b32b4..57e32a837457 100755 --- a/lld/test/MachO/tools/generate-thunkable-program.py +++ b/lld/test/MachO/tools/generate-thunkable-program.py @@ -362,7 +362,7 @@ def print_function(addr, size, addrs): print_here_tail() def random_seed(): - """Generate a seed that can easily be passsed back in via --seed=STRING""" + """Generate a seed that can easily be passed back in via --seed=STRING""" return ''.join(random.choice(string.ascii_lowercase) for i in range(10)) def generate_sizes(base, megabytes): diff --git a/lld/test/wasm/debuginfo-undefined-global.s b/lld/test/wasm/debuginfo-undefined-global.s index 3d49a970c982..f0e9ed2a70f8 100644 --- a/lld/test/wasm/debuginfo-undefined-global.s +++ b/lld/test/wasm/debuginfo-undefined-global.s @@ -3,7 +3,7 @@ # RUN: obj2yaml %t.wasm | FileCheck %s # Debug sections are allowed to contains references to non-live symbols that -# then get GC'd. In this test the .debug_info seciton contains a reference to +# then get GC'd. In this test the .debug_info section contains a reference to # foo which is not otherwise used and will not be marked a live in the output. # Verify the tombstone value is written to debug_info section.