1 ; RUN: not llvm-as -disable-output < %s -o /dev/null 2>&1 | FileCheck %s
3 ; CHECK: associated value must be pointer typed
4 ; CHECK-NEXT: ptr addrspace(1) @associated.int
5 ; CHECK-NEXT: !0 = !{i32 1}
6 @associated.int = external addrspace(1) constant [8 x i8], !associated !0
8 ; CHECK: associated value must be pointer typed
9 ; CHECK-NEXT: ptr addrspace(1) @associated.float
10 ; CHECK-NEXT: !1 = !{float 1.000000e+00}
11 @associated.float = external addrspace(1) constant [8 x i8], !associated !1
13 ; CHECK: associated metadata must have one operand
14 ; CHECK-NEXT: ptr addrspace(1) @associated.too.many.ops
15 ; CHECK-NEXT: !2 = !{ptr @gv.decl0, ptr @gv.decl1}
16 @associated.too.many.ops = external addrspace(1) constant [8 x i8], !associated !2
18 ; CHECK: associated metadata must have one operand
19 ; CHECK-NEXT: ptr addrspace(1) @associated.empty
20 ; CHECK-NEXT: !3 = !{}
21 @associated.empty = external addrspace(1) constant [8 x i8], !associated !3
23 ; CHECK: associated metadata must have a global value
24 ; CHECK-NEXT: ptr addrspace(1) @associated.null.metadata
25 ; CHECK-NEXT: !4 = !{null}
26 @associated.null.metadata = external addrspace(1) constant [8 x i8], !associated !4
28 ; CHECK: global values should not associate to themselves
29 ; CHECK-NEXT: ptr @associated.self
30 ; CHECK-NEXT: !5 = !{ptr @associated.self}
31 @associated.self = external constant [8 x i8], !associated !5
33 ; CHECK: associated metadata must be ValueAsMetadata
34 ; CHECK-NEXT: ptr @associated.string
35 ; CHECK-NEXT: !6 = !{!"string"}
36 @associated.string = external constant [8 x i8], !associated !6
38 @gv.decl0 = external constant [8 x i8]
39 @gv.decl1 = external constant [8 x i8]
42 !1 = !{float 1.000000e+00}
43 !2 = !{ptr @gv.decl0, ptr @gv.decl1}
46 !5 = !{ptr @associated.self}