Skip to content

Commit 45b9e24

Browse files
authored
Fix some small typos in compiler-rt. NFC (#133388)
1 parent c8246f6 commit 45b9e24

File tree

19 files changed

+27
-26
lines changed

19 files changed

+27
-26
lines changed

compiler-rt/cmake/Modules/AddCompilerRT.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,7 @@ function(add_compiler_rt_test test_suite test_name arch)
525525
# when linking, not the compiler. Here, we hack it to use the compiler
526526
# because we want to use -fsanitize flags.
527527

528-
# Only add CMAKE_EXE_LINKER_FLAGS when in a standalone bulid.
528+
# Only add CMAKE_EXE_LINKER_FLAGS when in a standalone build.
529529
# Or else CMAKE_EXE_LINKER_FLAGS contains flags for build compiler of Clang/llvm.
530530
# This might not be the same as what the COMPILER_RT_TEST_COMPILER supports.
531531
# eg: the build compiler use lld linker and we build clang with default ld linker

compiler-rt/cmake/Modules/CompilerRTUtils.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ macro(detect_target_arch)
213213
elseif(CMAKE_SIZEOF_VOID_P EQUAL "8")
214214
add_default_target_arch(riscv64)
215215
else()
216-
message(FATAL_ERROR "Unsupport XLEN for RISC-V")
216+
message(FATAL_ERROR "Unsupported XLEN for RISC-V")
217217
endif()
218218
elseif(__S390X)
219219
add_default_target_arch(s390x)

compiler-rt/include/profile/InstrProfData.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,7 @@ typedef struct ValueProfData {
490490
} ValueProfData;
491491

492492
/*
493-
* The closure is designed to abstact away two types of value profile data:
493+
* The closure is designed to abstract away two types of value profile data:
494494
* - InstrProfRecord which is the primary data structure used to
495495
* represent profile data in host tools (reader, writer, and profile-use)
496496
* - value profile runtime data structure suitable to be used by C

compiler-rt/lib/asan/asan_activation.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ static struct AsanDeactivatedFlags {
5858
cf.verbosity = Verbosity();
5959
cf.help = false; // this is activation-specific help
6060

61-
// Check if activation flags need to be overriden.
61+
// Check if activation flags need to be overridden.
6262
if (const char *env = GetEnv("ASAN_ACTIVATION_OPTIONS")) {
6363
parser.ParseString(env);
6464
}

compiler-rt/lib/asan/asan_flags.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@
1919

2020
// ASan flag values can be defined in four ways:
2121
// 1) initialized with default values at startup.
22-
// 2) overriden during compilation of ASan runtime by providing
22+
// 2) overridden during compilation of ASan runtime by providing
2323
// compile definition ASAN_DEFAULT_OPTIONS.
24-
// 3) overriden from string returned by user-specified function
24+
// 3) overridden from string returned by user-specified function
2525
// __asan_default_options().
26-
// 4) overriden from env variable ASAN_OPTIONS.
27-
// 5) overriden during ASan activation (for now used on Android only).
26+
// 4) overridden from env variable ASAN_OPTIONS.
27+
// 5) overridden during ASan activation (for now used on Android only).
2828

2929
namespace __asan {
3030

compiler-rt/lib/asan/asan_interceptors.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -826,7 +826,7 @@ void InitializeAsanInterceptors() {
826826
ASAN_INTERCEPT_FUNC(__isoc23_strtoll);
827827
# endif
828828

829-
// Intecept jump-related functions.
829+
// Intercept jump-related functions.
830830
ASAN_INTERCEPT_FUNC(longjmp);
831831

832832
# if ASAN_INTERCEPT_SWAPCONTEXT

compiler-rt/lib/asan/asan_report.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -592,5 +592,5 @@ void __sanitizer_ptr_cmp(void *a, void *b) {
592592
} // extern "C"
593593

594594
// Provide default implementation of __asan_on_error that does nothing
595-
// and may be overriden by user.
595+
// and may be overridden by user.
596596
SANITIZER_INTERFACE_WEAK_DEF(void, __asan_on_error, void) {}

compiler-rt/lib/memprof/memprof_flags.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
#include "sanitizer_common/sanitizer_internal_defs.h"
1919

2020
// Default MemProf flags are defined in memprof_flags.inc and sancov_flags.inc.
21-
// These values can be overridded in a number of ways, each option overrides the
21+
// These values can be overridden in a number of ways, each option overrides the
2222
// prior one:
2323
// 1) by setting MEMPROF_DEFAULT_OPTIONS during the compilation of the MemProf
2424
// runtime

compiler-rt/lib/profile/InstrProfiling.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ uint64_t __llvm_profile_get_vtable_section_size(const VTableProfData *Begin,
277277

278278
/* ! \brief Given the sizes of the data and counter information, computes the
279279
* number of padding bytes before and after the counter section, as well as the
280-
* number of padding bytes after other setions in the raw profile.
280+
* number of padding bytes after other sections in the raw profile.
281281
* Returns -1 upon errors and 0 upon success. Output parameters should be used
282282
* iff return value is 0.
283283
*
@@ -302,7 +302,7 @@ int __llvm_profile_get_padding_sizes_for_counters(
302302
void __llvm_profile_set_dumped(void);
303303

304304
/*!
305-
* \brief Write custom target-specific profiling data to a seperate file.
305+
* \brief Write custom target-specific profiling data to a separate file.
306306
* Used by offload PGO.
307307
*/
308308
int __llvm_write_custom_profile(const char *Target,

compiler-rt/lib/profile/InstrProfilingFile.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ COMPILER_RT_VISIBILITY extern int64_t INSTR_PROF_PROFILE_BITMAP_BIAS_VAR
234234
#endif
235235
static const int ContinuousModeSupported = 1;
236236
static const int UseBiasVar = 1;
237-
/* TODO: If there are two DSOs, the second DSO initilization will truncate the
237+
/* TODO: If there are two DSOs, the second DSO initialization will truncate the
238238
* first profile file. */
239239
static const char *FileOpenMode = "w+b";
240240
/* This symbol is defined by the compiler when runtime counter relocation is
@@ -438,7 +438,7 @@ static int mmapProfileForMerging(FILE *ProfileFile, uint64_t ProfileFileSize,
438438
}
439439

440440
/* Read profile data in \c ProfileFile and merge with in-memory
441-
profile counters. Returns -1 if there is fatal error, otheriwse
441+
profile counters. Returns -1 if there is fatal error, otherwise
442442
0 is returned. Returning 0 does not mean merge is actually
443443
performed. If merge is actually done, *MergeDone is set to 1.
444444
*/
@@ -850,8 +850,9 @@ static int parseFilenamePattern(const char *FilenamePat,
850850
__llvm_profile_set_page_size(getpagesize());
851851
__llvm_profile_enable_continuous_mode();
852852
#else
853-
PROF_WARN("%s", "Continous mode is currently only supported for Mach-O,"
854-
" ELF and COFF formats.");
853+
PROF_WARN("%s",
854+
"Continuous mode is currently only supported for Mach-O,"
855+
" ELF and COFF formats.");
855856
return -1;
856857
#endif
857858
} else {

compiler-rt/lib/profile/InstrProfilingInternal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ typedef struct VPDataReaderType {
128128
uint8_t *SiteCountArray[]);
129129
/* Function pointer to getValueProfRecordHeader method. */
130130
uint32_t (*GetValueProfRecordHeaderSize)(uint32_t NumSites);
131-
/* Function pointer to getFristValueProfRecord method. */
131+
/* Function pointer to getFirstValueProfRecord method. */
132132
struct ValueProfRecord *(*GetFirstValueProfRecord)(struct ValueProfData *);
133133
/* Return the number of value data for site \p Site. */
134134
uint32_t (*GetNumValueDataForSite)(uint32_t VK, uint32_t Site);

compiler-rt/test/asan/TestCases/Posix/deep_call_stack.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Check that UAR mode can handle very deep recusrion.
1+
// Check that UAR mode can handle very deep recursion.
22
// REQUIRES: shell
33
// RUN: %clangxx_asan -O2 %s -o %t
44
// RUN: ulimit -s 4096

compiler-rt/test/asan/TestCases/Posix/stack-overflow.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ void recursive_func(uintptr_t parent_frame_address) {
7171
z13 = t13;
7272
#else
7373
char buf[BS];
74-
// Check that the stack grows in the righ direction, unless we use fake stack.
74+
// Check that the stack grows in the right direction, unless we use fake stack.
7575
assert(parent_frame_address > (uintptr_t)__builtin_frame_address(0));
7676
buf[rand() % BS] = 1;
7777
buf[rand() % BS] = 2;

compiler-rt/test/asan/TestCases/alloca_instruments_all_paddings.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// RUN: %clangxx_asan -O3 -mllvm -asan-instrument-dynamic-allocas %s -o %t
33
// RUN: %run %t 2>&1
44
//
5-
// MSVC does not support asan-instrament-dynamic-allocas yet
5+
// MSVC does not support asan-instrument-dynamic-allocas yet
66
// UNSUPPORTED: msvc
77

88
#include "sanitizer/asan_interface.h"

compiler-rt/test/metadata/lit.cfg.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
config.name = "SanitizerBinaryMetadata"
44
config.test_source_root = os.path.dirname(__file__)
55
config.suffixes = [".cpp"]
6-
# Binary metadata is currently emited only for ELF binaries
6+
# Binary metadata is currently emitted only for ELF binaries
77
# and sizes of stack arguments depend on the arch.
88
if config.host_os not in ["Linux"] or config.target_arch not in ["x86_64"]:
99
config.unsupported = True

compiler-rt/test/sanitizer_common/TestCases/Darwin/malloc_zone.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
// UBSan does not install a malloc zone.
1818
// XFAIL: ubsan
1919
//
20-
// Curently fails on darwin/lsan rdar://145873843
20+
// Currently fails on darwin/lsan rdar://145873843
2121
// XFAIL: darwin && lsan
2222

2323
#include <malloc/malloc.h>

compiler-rt/test/tsan/Darwin/no_call_setenv_in_symbolize.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// RUN: %clangxx_tsan -O1 %s -o %t
22
// `handle_sigbus=0` is required because when the rdar://problem/58789439 bug was
3-
// present TSan's runtime could derefence bad memory leading to SIGBUS being raised.
3+
// present TSan's runtime could dereference bad memory leading to SIGBUS being raised.
44
// If the signal was caught TSan would deadlock because it would try to run the
55
// symbolizer again.
66
// RUN: %env_tsan_opts=handle_sigbus=0,symbolize=1 %run %t 2>&1 | FileCheck %s

compiler-rt/test/tsan/Linux/clone_setns.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
// The test models how sandbox2 unshares user namespace after clone:
44
// https://github.com/google/sandboxed-api/blob/c95837a6c131fbdf820db352a97d54fcbcbde6c0/sandboxed_api/sandbox2/forkserver.cc#L249
5-
// which works only in sigle-threaded processes.
5+
// which works only in single-threaded processes.
66

77
#include "../test.h"
88
#include <errno.h>

llvm/include/llvm/ProfileData/InstrProfData.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,7 @@ typedef struct ValueProfData {
490490
} ValueProfData;
491491

492492
/*
493-
* The closure is designed to abstact away two types of value profile data:
493+
* The closure is designed to abstract away two types of value profile data:
494494
* - InstrProfRecord which is the primary data structure used to
495495
* represent profile data in host tools (reader, writer, and profile-use)
496496
* - value profile runtime data structure suitable to be used by C

0 commit comments

Comments
 (0)