blob: c86db49ee8129cd2a857be251020ed316ea3b40a [file] [log] [blame]
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-ir %s | %FileCheck %s
// REQUIRES: objc_interop
sil_stage canonical
import Builtin
// CHECK: @"\01L_selector_data(help:me:)" = private global [9 x i8] c"help:me:\00", section "__TEXT,__objc_methname,cstring_literals"
// CHECK: @"\01L_selector(help:me:)" = private externally_initialized global i8* getelementptr inbounds ([9 x i8], [9 x i8]* @"\01L_selector_data(help:me:)", {{i(32|64)}} 0, {{i(32|64)}} 0), section "__DATA,__objc_selrefs,literal_pointers,no_dead_strip"
// CHECK-LABEL: define{{( protected)?}} swiftcc i8* @objc_selector_literal() #0 {
sil @objc_selector_literal : $@convention(thin) () -> Builtin.RawPointer {
bb0:
// CHECK: [[SEL:%[0-9]+]] = load i8*, i8** @"\01L_selector(help:me:)"
%0 = string_literal objc_selector "help:me:"
// CHECK-NEXT: ret i8* [[SEL]]
return %0 : $Builtin.RawPointer
}