blob: adb395021e73eaead1b242fdb8d11bc1bded4668 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -o - %s
struct A {
union {
int a;
void* b;
};
A() : a(0) { }
};
A a;
namespace PR7021 {
struct X
{
union { long l; };
};
// CHECK: define void @_ZN6PR70211fENS_1XES0_
void f(X x, X z) {
X x1;
// CHECK: store i64 1, i64
x1.l = 1;
// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64
X x2(x1);
X x3;
// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64
x3 = x1;
// CHECK: ret void
}
}
|