Skip to content

Commit 6d58584

Browse files
committed
add comment about -fno-objc-msgsend-selector-stubs
1 parent 272733b commit 6d58584

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

compiler/rustc_codegen_llvm/src/consts.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -658,6 +658,10 @@ impl<'ll> CodegenCx<'ll, '_> {
658658
// deduplicate references within a CGU, but we need a reference definition in each referencing
659659
// CGU. All attempts at using external references to a single reference definition result in
660660
// linker errors.
661+
//
662+
// Newer versions of Apple Clang generate calls to `@"objc_msgSend$methname"` selector stub
663+
// functions. We don't currently do that. The code we generate is closer to what Apple Clang
664+
// generates with the `-fno-objc-msgsend-selector-stubs` option.
661665
fn get_objc_selref(&self, methname: Symbol) -> &'ll Value {
662666
let mut selrefs = self.objc_selrefs.borrow_mut();
663667
if let Some(selref) = selrefs.get(&methname).copied() {

0 commit comments

Comments
 (0)