diff options
Diffstat (limited to 'test/CodeGen')
-rw-r--r-- | test/CodeGen/2008-08-25-incompatible-cond-expr.m | 10 | ||||
-rw-r--r-- | test/CodeGen/2009-01-21-invalid-debug-info.m | 16 | ||||
-rw-r--r-- | test/CodeGen/2010-02-09-DbgSelf.m | 14 | ||||
-rw-r--r-- | test/CodeGen/2010-02-15-Dbg-MethodStart.m | 15 | ||||
-rw-r--r-- | test/CodeGen/asm-inout.c | 9 | ||||
-rw-r--r-- | test/CodeGen/attribute-section-data-common.c | 5 | ||||
-rw-r--r-- | test/CodeGen/decl.c | 2 | ||||
-rw-r--r-- | test/CodeGen/function-decay.m | 10 | ||||
-rw-r--r-- | test/CodeGen/illegal-UTF8.m | 6 | ||||
-rw-r--r-- | test/CodeGen/may-alias.c | 13 | ||||
-rw-r--r-- | test/CodeGen/rdr-6732143-dangling-block-reference.m | 10 |
11 files changed, 26 insertions, 84 deletions
diff --git a/test/CodeGen/2008-08-25-incompatible-cond-expr.m b/test/CodeGen/2008-08-25-incompatible-cond-expr.m deleted file mode 100644 index f285cca..0000000 --- a/test/CodeGen/2008-08-25-incompatible-cond-expr.m +++ /dev/null @@ -1,10 +0,0 @@ -// RUN: %clang_cc1 -emit-llvm -o %t %s - -@protocol P0 -@end -@interface A <P0> -@end - -id f0(int a, id<P0> x, A* p) { - return a ? x : p; -} diff --git a/test/CodeGen/2009-01-21-invalid-debug-info.m b/test/CodeGen/2009-01-21-invalid-debug-info.m deleted file mode 100644 index af912e2..0000000 --- a/test/CodeGen/2009-01-21-invalid-debug-info.m +++ /dev/null @@ -1,16 +0,0 @@ -// RUN: %clang_cc1 -S -g -o %t.s %s - -// FIXME: This test case can be removed at some point (since it will -// no longer effectively test anything). The reason it was causing -// trouble was the synthesized self decl in im1 was causing the debug -// info for I1* to be generated, but referring to an invalid compile -// unit. This was later referred to by f1 and created ill formed debug -// information. - -@interface I1 @end - -@implementation I1 --im0 { return 0; } -@end - -I1 *f1(void) { return 0; } diff --git a/test/CodeGen/2010-02-09-DbgSelf.m b/test/CodeGen/2010-02-09-DbgSelf.m deleted file mode 100644 index e09adac..0000000 --- a/test/CodeGen/2010-02-09-DbgSelf.m +++ /dev/null @@ -1,14 +0,0 @@ -// RUN: %clang_cc1 -x objective-c -emit-llvm -g < %s | grep "\"self\", metadata" -// Test to check that "self" argument is assigned a location. - -@interface Foo --(void) Bar: (int)x ; -@end - - -@implementation Foo --(void) Bar: (int)x -{ -} -@end - diff --git a/test/CodeGen/2010-02-15-Dbg-MethodStart.m b/test/CodeGen/2010-02-15-Dbg-MethodStart.m deleted file mode 100644 index 5186b20..0000000 --- a/test/CodeGen/2010-02-15-Dbg-MethodStart.m +++ /dev/null @@ -1,15 +0,0 @@ -// RUN: %clang_cc1 -x objective-c -emit-llvm -g < %s | grep subprogram | grep "i32 9" -// Test to check that subprogram start location. - -@interface Foo --(int) barMethod; -@end - -@implementation Foo --(int) barMethod { - int i = 0; - int j = 1; - int k = 1; - return i + j + k; -} -@end diff --git a/test/CodeGen/asm-inout.c b/test/CodeGen/asm-inout.c index 5b0a5f7..29142f7 100644 --- a/test/CodeGen/asm-inout.c +++ b/test/CodeGen/asm-inout.c @@ -29,3 +29,12 @@ asm( : "edi" ); } + +// PR8959 - This should implicitly truncate the immediate to a byte. +int test4(volatile int *addr) { + unsigned char oldval; + __asm__ ("frob %0" : "=r"(oldval) : "0"(0xff)); + return (int)oldval; +// CHECK: call i8 asm "frob $0", "=r,0{{.*}}"(i8 -1) +} + diff --git a/test/CodeGen/attribute-section-data-common.c b/test/CodeGen/attribute-section-data-common.c new file mode 100644 index 0000000..2393bfb --- /dev/null +++ b/test/CodeGen/attribute-section-data-common.c @@ -0,0 +1,5 @@ +// RUN: %clang -S %s -o /dev/null +struct rtxc_snapshot { + int a, b, c, d; +}; +__attribute__ ((section("__DATA, __common"))) struct rtxc_snapshot rtxc_log_A[4]; diff --git a/test/CodeGen/decl.c b/test/CodeGen/decl.c index 7a9971e..5be4216 100644 --- a/test/CodeGen/decl.c +++ b/test/CodeGen/decl.c @@ -1,6 +1,6 @@ // RUN: %clang_cc1 -w -emit-llvm < %s | FileCheck %s -// CHECK: @test1.x = internal constant [12 x i32] [i32 1 +// CHECK: @test1.x = private constant [12 x i32] [i32 1 // CHECK: @test2.x = internal constant [13 x i32] [i32 1, // CHECK: @test5w = global %0 { i32 2, [4 x i8] undef } // CHECK: @test5y = global %union.test5u { double 7.300000e+0{{[0]*}}1 } diff --git a/test/CodeGen/function-decay.m b/test/CodeGen/function-decay.m deleted file mode 100644 index 161f907..0000000 --- a/test/CodeGen/function-decay.m +++ /dev/null @@ -1,10 +0,0 @@ -// RUN: %clang_cc1 %s -emit-llvm -o - - -@interface I0 @end -@implementation I0 -- (void) im0: (int (void)) a0 { -} -@end - -void func(int pf(void)) { -} diff --git a/test/CodeGen/illegal-UTF8.m b/test/CodeGen/illegal-UTF8.m deleted file mode 100644 index 4762e80..0000000 --- a/test/CodeGen/illegal-UTF8.m +++ /dev/null @@ -1,6 +0,0 @@ -// RUN: %clang %s -S -m64 -o - - -@class NSString; - - -NSString *S = @"\xff\xff___WAIT___"; // expected-warning {{input conversion stopped due to an input byte that does not belong to the input codeset UTF-8}} diff --git a/test/CodeGen/may-alias.c b/test/CodeGen/may-alias.c index f3ea792..6171be7 100644 --- a/test/CodeGen/may-alias.c +++ b/test/CodeGen/may-alias.c @@ -8,12 +8,21 @@ typedef int __attribute__((may_alias)) aliasing_int; void test0(aliasing_int *ai, int *i) { +// CHECK: store i32 0, i32* %{{.*}}, !tbaa !1 *ai = 0; +// CHECK: store i32 1, i32* %{{.*}}, !tbaa !3 *i = 1; } -// CHECK: store i32 0, i32* %{{.*}}, !tbaa !1 -// CHECK: store i32 1, i32* %{{.*}}, !tbaa !3 +// PR9307 +struct Test1 { int x; }; +struct Test1MA { int x; } __attribute__((may_alias)); +void test1(struct Test1MA *p1, struct Test1 *p2) { + // CHECK: store i32 2, i32* {{%.*}}, !tbaa !1 + p1->x = 2; + // CHECK: store i32 3, i32* {{%.*}}, !tbaa !3 + p2->x = 3; +} // CHECK: !0 = metadata !{metadata !"any pointer", metadata !1} // CHECK: !1 = metadata !{metadata !"omnipotent char", metadata !2} diff --git a/test/CodeGen/rdr-6732143-dangling-block-reference.m b/test/CodeGen/rdr-6732143-dangling-block-reference.m deleted file mode 100644 index b4d21a3..0000000 --- a/test/CodeGen/rdr-6732143-dangling-block-reference.m +++ /dev/null @@ -1,10 +0,0 @@ -// RUN: %clang_cc1 -triple x86_64-apple-darwin9 -emit-llvm %s -o - - -void f0(id x) { - @synchronized (x) { - do { ; } while(0); - @try { - } @finally { - } - } -} |