Skip to content

Commit e53bd4c

Browse files
authored
Rollup merge of #108126 - tshepang:nits, r=lcnr
fix a line, and do a consistency fix
2 parents 9956766 + f997231 commit e53bd4c

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

compiler/rustc_codegen_llvm/src/consts.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,7 @@ impl<'ll> StaticMethods for CodegenCx<'ll, '_> {
521521

522522
// The semantics of #[used] in Rust only require the symbol to make it into the
523523
// object file. It is explicitly allowed for the linker to strip the symbol if it
524-
// is dead, which means we are allowed use `llvm.compiler.used` instead of
524+
// is dead, which means we are allowed to use `llvm.compiler.used` instead of
525525
// `llvm.used` here.
526526
//
527527
// Additionally, https://reviews.llvm.org/D97448 in LLVM 13 started emitting unique
@@ -532,7 +532,7 @@ impl<'ll> StaticMethods for CodegenCx<'ll, '_> {
532532
// That said, we only ever emit these when compiling for ELF targets, unless
533533
// `#[used(compiler)]` is explicitly requested. This is to avoid similar breakage
534534
// on other targets, in particular MachO targets have *their* static constructor
535-
// lists broken if `llvm.compiler.used` is emitted rather than llvm.used. However,
535+
// lists broken if `llvm.compiler.used` is emitted rather than `llvm.used`. However,
536536
// that check happens when assigning the `CodegenFnAttrFlags` in `rustc_hir_analysis`,
537537
// so we don't need to take care of it here.
538538
self.add_compiler_used_global(g);

compiler/rustc_middle/src/middle/codegen_fn_attrs.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,8 @@ bitflags! {
9191
/// the MIR `InstrumentCoverage` pass and not added to the coverage map
9292
/// during codegen.
9393
const NO_COVERAGE = 1 << 15;
94-
/// `#[used(linker)]`: indicates that LLVM nor the linker can eliminate this function.
94+
/// `#[used(linker)]`:
95+
/// indicates that neither LLVM nor the linker will eliminate this function.
9596
const USED_LINKER = 1 << 16;
9697
/// `#[rustc_deallocator]`: a hint to LLVM that the function only deallocates memory.
9798
const DEALLOCATOR = 1 << 17;

0 commit comments

Comments
 (0)