diff options
author | dim <dim@FreeBSD.org> | 2015-05-27 18:47:56 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2015-05-27 18:47:56 +0000 |
commit | 3191b2b32a96e1a6ee833fcca73e5c8e0c67ba65 (patch) | |
tree | dbbd4047878da71c1a706e26ce05b4e7791b14cc /test/CodeGenCXX/pointers-to-data-members.cpp | |
parent | 38d6f2e7f2ce51a5b3836d26596c6c34a3288752 (diff) | |
download | FreeBSD-src-3191b2b32a96e1a6ee833fcca73e5c8e0c67ba65.zip FreeBSD-src-3191b2b32a96e1a6ee833fcca73e5c8e0c67ba65.tar.gz |
Vendor import of clang trunk r238337:
https://llvm.org/svn/llvm-project/cfe/trunk@238337
Diffstat (limited to 'test/CodeGenCXX/pointers-to-data-members.cpp')
-rw-r--r-- | test/CodeGenCXX/pointers-to-data-members.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/test/CodeGenCXX/pointers-to-data-members.cpp b/test/CodeGenCXX/pointers-to-data-members.cpp index 0b99fea..0f2ddaa 100644 --- a/test/CodeGenCXX/pointers-to-data-members.cpp +++ b/test/CodeGenCXX/pointers-to-data-members.cpp @@ -75,14 +75,14 @@ void f() { // CHECK: store i64 -1, i64* @_ZN5Casts2paE pa = 0; - // CHECK-NEXT: [[TMP:%.*]] = load i64* @_ZN5Casts2paE, align 8 + // CHECK-NEXT: [[TMP:%.*]] = load i64, i64* @_ZN5Casts2paE, align 8 // CHECK-NEXT: [[ADJ:%.*]] = add nsw i64 [[TMP]], 4 // CHECK-NEXT: [[ISNULL:%.*]] = icmp eq i64 [[TMP]], -1 // CHECK-NEXT: [[RES:%.*]] = select i1 [[ISNULL]], i64 [[TMP]], i64 [[ADJ]] // CHECK-NEXT: store i64 [[RES]], i64* @_ZN5Casts2pcE pc = pa; - // CHECK-NEXT: [[TMP:%.*]] = load i64* @_ZN5Casts2pcE, align 8 + // CHECK-NEXT: [[TMP:%.*]] = load i64, i64* @_ZN5Casts2pcE, align 8 // CHECK-NEXT: [[ADJ:%.*]] = sub nsw i64 [[TMP]], 4 // CHECK-NEXT: [[ISNULL:%.*]] = icmp eq i64 [[TMP]], -1 // CHECK-NEXT: [[RES:%.*]] = select i1 [[ISNULL]], i64 [[TMP]], i64 [[ADJ]] @@ -205,7 +205,7 @@ namespace BoolPtrToMember { // CHECK-LABEL: define dereferenceable({{[0-9]+}}) i8* @_ZN15BoolPtrToMember1fERNS_1XEMS0_b bool &f(X &x, bool X::*member) { // CHECK: {{bitcast.* to i8\*}} - // CHECK-NEXT: getelementptr inbounds i8* + // CHECK-NEXT: getelementptr inbounds i8, i8* // CHECK-NEXT: ret i8* return x.*member; } @@ -277,4 +277,12 @@ U u; // CHECK-GLOBAL: @_ZN7PR212821uE = global %"union.PR21282::U" { i64 -1, [8 x i8] zeroinitializer }, align 8 } +namespace FlexibleArrayMember { +struct S { + int S::*x[]; +}; +S s; +// CHECK-GLOBAL: @_ZN19FlexibleArrayMember1sE = global %"struct.FlexibleArrayMember::S" zeroinitializer, align 8 +} + // CHECK-O3: attributes [[NUW]] = { nounwind readnone{{.*}} } |