diff options
Diffstat (limited to 'test/CodeGenObjC/boxing.m')
-rw-r--r-- | test/CodeGenObjC/boxing.m | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/CodeGenObjC/boxing.m b/test/CodeGenObjC/boxing.m index 42dd33337f..9b501b18bc 100644 --- a/test/CodeGenObjC/boxing.m +++ b/test/CodeGenObjC/boxing.m @@ -53,6 +53,9 @@ typedef signed char BOOL; + (id)stringWithUTF8String:(const char *)nullTerminatedCString; @end +// CHECK: [[V0:%.*]] = type opaque +// CHECK: [[STRUCT_NSCONSTANT_STRING_TAG:%.*]] = type { i32*, i32, i8*, i64 } + // CHECK: [[WithIntMeth:@.*]] = private unnamed_addr constant [15 x i8] c"numberWithInt:\00" // CHECK: [[WithIntSEL:@.*]] = private externally_initialized global i8* getelementptr inbounds ([15 x i8], [15 x i8]* [[WithIntMeth]] // CHECK: [[WithCharMeth:@.*]] = private unnamed_addr constant [16 x i8] c"numberWithChar:\00" @@ -65,8 +68,12 @@ typedef signed char BOOL; // CHECK: [[WithUnsignedIntegerSEL:@.*]] = private externally_initialized global i8* getelementptr inbounds ([27 x i8], [27 x i8]* [[WithUnsignedIntegerMeth]] // CHECK: [[stringWithUTF8StringMeth:@.*]] = private unnamed_addr constant [22 x i8] c"stringWithUTF8String:\00" // CHECK: [[stringWithUTF8StringSEL:@.*]] = private externally_initialized global i8* getelementptr inbounds ([22 x i8], [22 x i8]* [[stringWithUTF8StringMeth]] +// CHECK: [[STR0:.*]] = private unnamed_addr constant [4 x i8] c"abc\00", section "__TEXT,__cstring,cstring_literals", align 1 +// CHECK: [[UNNAMED_CFSTRING:.*]] = private global [[STRUCT_NSCONSTANT_STRING_TAG]] { i32* getelementptr inbounds ([0 x i32], [0 x i32]* @__CFConstantStringClassReference, i32 0, i32 0), i32 1992, i8* getelementptr inbounds ([4 x i8], [4 x i8]* [[STR0]], i32 0, i32 0), i64 3 }, section "__DATA,__cfstring", align 8 int main() { + // CHECK: [[T:%.*]] = alloca [[V0]]*, align 8 + // CHECK: load i8*, i8** [[WithIntSEL]] int i; @(i); // CHECK: load i8*, i8** [[WithCharSEL]] @@ -92,4 +99,7 @@ int main() { Color col = Red; // CHECK: load i8*, i8** [[WithIntegerSEL]] @(col); + + // CHECK: store [[V0]]* bitcast ([[STRUCT_NSCONSTANT_STRING_TAG]]* [[UNNAMED_CFSTRING]] to [[V0]]*), [[V0]]** [[T]], align 8 + NSString *t = @("abc"); } |