Skip to content

Fix some small typos in compiler-rt. NFC #133388

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion compiler-rt/cmake/Modules/AddCompilerRT.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@ function(add_compiler_rt_test test_suite test_name arch)
# when linking, not the compiler. Here, we hack it to use the compiler
# because we want to use -fsanitize flags.

# Only add CMAKE_EXE_LINKER_FLAGS when in a standalone bulid.
# Only add CMAKE_EXE_LINKER_FLAGS when in a standalone build.
# Or else CMAKE_EXE_LINKER_FLAGS contains flags for build compiler of Clang/llvm.
# This might not be the same as what the COMPILER_RT_TEST_COMPILER supports.
# eg: the build compiler use lld linker and we build clang with default ld linker
Expand Down
2 changes: 1 addition & 1 deletion compiler-rt/cmake/Modules/CompilerRTUtils.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ macro(detect_target_arch)
elseif(CMAKE_SIZEOF_VOID_P EQUAL "8")
add_default_target_arch(riscv64)
else()
message(FATAL_ERROR "Unsupport XLEN for RISC-V")
message(FATAL_ERROR "Unsupported XLEN for RISC-V")
endif()
elseif(__S390X)
add_default_target_arch(s390x)
Expand Down
2 changes: 1 addition & 1 deletion compiler-rt/include/profile/InstrProfData.inc
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ typedef struct ValueProfData {
} ValueProfData;

/*
* The closure is designed to abstact away two types of value profile data:
* The closure is designed to abstract away two types of value profile data:
* - InstrProfRecord which is the primary data structure used to
* represent profile data in host tools (reader, writer, and profile-use)
* - value profile runtime data structure suitable to be used by C
Expand Down
2 changes: 1 addition & 1 deletion compiler-rt/lib/asan/asan_activation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ static struct AsanDeactivatedFlags {
cf.verbosity = Verbosity();
cf.help = false; // this is activation-specific help

// Check if activation flags need to be overriden.
// Check if activation flags need to be overridden.
if (const char *env = GetEnv("ASAN_ACTIVATION_OPTIONS")) {
parser.ParseString(env);
}
Expand Down
8 changes: 4 additions & 4 deletions compiler-rt/lib/asan/asan_flags.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@

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

namespace __asan {

Expand Down
2 changes: 1 addition & 1 deletion compiler-rt/lib/asan/asan_interceptors.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -826,7 +826,7 @@ void InitializeAsanInterceptors() {
ASAN_INTERCEPT_FUNC(__isoc23_strtoll);
# endif

// Intecept jump-related functions.
// Intercept jump-related functions.
ASAN_INTERCEPT_FUNC(longjmp);

# if ASAN_INTERCEPT_SWAPCONTEXT
Expand Down
2 changes: 1 addition & 1 deletion compiler-rt/lib/asan/asan_report.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -592,5 +592,5 @@ void __sanitizer_ptr_cmp(void *a, void *b) {
} // extern "C"

// Provide default implementation of __asan_on_error that does nothing
// and may be overriden by user.
// and may be overridden by user.
SANITIZER_INTERFACE_WEAK_DEF(void, __asan_on_error, void) {}
2 changes: 1 addition & 1 deletion compiler-rt/lib/memprof/memprof_flags.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#include "sanitizer_common/sanitizer_internal_defs.h"

// Default MemProf flags are defined in memprof_flags.inc and sancov_flags.inc.
// These values can be overridded in a number of ways, each option overrides the
// These values can be overridden in a number of ways, each option overrides the
// prior one:
// 1) by setting MEMPROF_DEFAULT_OPTIONS during the compilation of the MemProf
// runtime
Expand Down
4 changes: 2 additions & 2 deletions compiler-rt/lib/profile/InstrProfiling.h
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ uint64_t __llvm_profile_get_vtable_section_size(const VTableProfData *Begin,

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

/*!
* \brief Write custom target-specific profiling data to a seperate file.
* \brief Write custom target-specific profiling data to a separate file.
* Used by offload PGO.
*/
int __llvm_write_custom_profile(const char *Target,
Expand Down
9 changes: 5 additions & 4 deletions compiler-rt/lib/profile/InstrProfilingFile.c
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ COMPILER_RT_VISIBILITY extern int64_t INSTR_PROF_PROFILE_BITMAP_BIAS_VAR
#endif
static const int ContinuousModeSupported = 1;
static const int UseBiasVar = 1;
/* TODO: If there are two DSOs, the second DSO initilization will truncate the
/* TODO: If there are two DSOs, the second DSO initialization will truncate the
* first profile file. */
static const char *FileOpenMode = "w+b";
/* This symbol is defined by the compiler when runtime counter relocation is
Expand Down Expand Up @@ -438,7 +438,7 @@ static int mmapProfileForMerging(FILE *ProfileFile, uint64_t ProfileFileSize,
}

/* Read profile data in \c ProfileFile and merge with in-memory
profile counters. Returns -1 if there is fatal error, otheriwse
profile counters. Returns -1 if there is fatal error, otherwise
0 is returned. Returning 0 does not mean merge is actually
performed. If merge is actually done, *MergeDone is set to 1.
*/
Expand Down Expand Up @@ -850,8 +850,9 @@ static int parseFilenamePattern(const char *FilenamePat,
__llvm_profile_set_page_size(getpagesize());
__llvm_profile_enable_continuous_mode();
#else
PROF_WARN("%s", "Continous mode is currently only supported for Mach-O,"
" ELF and COFF formats.");
PROF_WARN("%s",
"Continuous mode is currently only supported for Mach-O,"
" ELF and COFF formats.");
return -1;
#endif
} else {
Expand Down
2 changes: 1 addition & 1 deletion compiler-rt/lib/profile/InstrProfilingInternal.h
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ typedef struct VPDataReaderType {
uint8_t *SiteCountArray[]);
/* Function pointer to getValueProfRecordHeader method. */
uint32_t (*GetValueProfRecordHeaderSize)(uint32_t NumSites);
/* Function pointer to getFristValueProfRecord method. */
/* Function pointer to getFirstValueProfRecord method. */
struct ValueProfRecord *(*GetFirstValueProfRecord)(struct ValueProfData *);
/* Return the number of value data for site \p Site. */
uint32_t (*GetNumValueDataForSite)(uint32_t VK, uint32_t Site);
Expand Down
2 changes: 1 addition & 1 deletion compiler-rt/test/asan/TestCases/Posix/deep_call_stack.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Check that UAR mode can handle very deep recusrion.
// Check that UAR mode can handle very deep recursion.
// REQUIRES: shell
// RUN: %clangxx_asan -O2 %s -o %t
// RUN: ulimit -s 4096
Expand Down
2 changes: 1 addition & 1 deletion compiler-rt/test/asan/TestCases/Posix/stack-overflow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ void recursive_func(uintptr_t parent_frame_address) {
z13 = t13;
#else
char buf[BS];
// Check that the stack grows in the righ direction, unless we use fake stack.
// Check that the stack grows in the right direction, unless we use fake stack.
assert(parent_frame_address > (uintptr_t)__builtin_frame_address(0));
buf[rand() % BS] = 1;
buf[rand() % BS] = 2;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// RUN: %clangxx_asan -O3 -mllvm -asan-instrument-dynamic-allocas %s -o %t
// RUN: %run %t 2>&1
//
// MSVC does not support asan-instrament-dynamic-allocas yet
// MSVC does not support asan-instrument-dynamic-allocas yet
// UNSUPPORTED: msvc

#include "sanitizer/asan_interface.h"
Expand Down
2 changes: 1 addition & 1 deletion compiler-rt/test/metadata/lit.cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
config.name = "SanitizerBinaryMetadata"
config.test_source_root = os.path.dirname(__file__)
config.suffixes = [".cpp"]
# Binary metadata is currently emited only for ELF binaries
# Binary metadata is currently emitted only for ELF binaries
# and sizes of stack arguments depend on the arch.
if config.host_os not in ["Linux"] or config.target_arch not in ["x86_64"]:
config.unsupported = True
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
// UBSan does not install a malloc zone.
// XFAIL: ubsan
//
// Curently fails on darwin/lsan rdar://145873843
// Currently fails on darwin/lsan rdar://145873843
// XFAIL: darwin && lsan

#include <malloc/malloc.h>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// RUN: %clangxx_tsan -O1 %s -o %t
// `handle_sigbus=0` is required because when the rdar://problem/58789439 bug was
// present TSan's runtime could derefence bad memory leading to SIGBUS being raised.
// present TSan's runtime could dereference bad memory leading to SIGBUS being raised.
// If the signal was caught TSan would deadlock because it would try to run the
// symbolizer again.
// RUN: %env_tsan_opts=handle_sigbus=0,symbolize=1 %run %t 2>&1 | FileCheck %s
Expand Down
2 changes: 1 addition & 1 deletion compiler-rt/test/tsan/Linux/clone_setns.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

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

#include "../test.h"
#include <errno.h>
Expand Down
2 changes: 1 addition & 1 deletion llvm/include/llvm/ProfileData/InstrProfData.inc
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ typedef struct ValueProfData {
} ValueProfData;

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