Lines Matching full:weak
3 // CHECK: @weakvar = weak global
5 // CHECK: @correct_linkage = weak global
10 // CHECK-DAG: @weakvar_alias = weak alias i32, i32* @__weakvar_alias
11 // CHECK-DAG: @foo = weak alias void (), void ()* @__foo
12 // CHECK-DAG: @foo2 = weak alias void (), void ()* @__foo2
13 // CHECK-DAG: @stutter = weak alias void (), void ()* @__stutter
14 // CHECK-DAG: @stutter2 = weak alias void (), void ()* @__stutter2
15 // CHECK-DAG: @declfirst = weak alias void (), void ()* @__declfirst
16 // CHECK-DAG: @declfirstattr = weak alias void (), void ()* @__declfirstattr
17 // CHECK-DAG: @mix2 = weak alias void (), void ()* @__mix2
18 // CHECK-DAG: @a1 = weak alias void (), void ()* @__a1
19 // CHECK-DAG: @xxx = weak alias void (), void ()* @__xxx
23 // CHECK-LABEL: define weak void @weakdef()
26 #pragma weak weakvar
29 #pragma weak weakdef
32 #pragma weak param // expected-warning {{weak identifier 'param' never declared}}
33 #pragma weak correct_linkage
38 #pragma weak weakvar_alias = __weakvar_alias
41 #pragma weak foo = __foo
47 #pragma weak foo2 = __foo2
53 #pragma weak unused // expected-warning {{weak identifier 'unused' never declared}}
54 #pragma weak unused_alias = __unused_alias // expected-warning {{weak identifier '__unused_alias' …
56 #pragma weak td // expected-warning {{'weak' attribute only applies to variables and functions}}
59 #pragma weak td2 = __td2 // expected-warning {{'weak' attribute only applies to variables and funct…
63 #pragma weak td3 = __td3 // expected-warning {{'weak' attribute only applies to variables and funct…
69 #pragma weak stutter = __stutter
70 #pragma weak stutter = __stutter
75 #pragma weak stutter2 = __stutter2
76 #pragma weak stutter2 = __stutter2
80 // test decl/pragma weak order
83 #pragma weak declfirst = __declfirst
88 #pragma weak declfirstattr = __declfirstattr
94 //// ensure that pragma weak/__attribute((weak)) play nice
97 #pragma weak mix
98 __attribute((weak)) void mix(void) { } in mix()
99 // CHECK-LABEL: define weak void @mix()
103 #pragma weak mix2 = __mix2
109 ////////////// test #pragma weak/__attribute combinations
111 // if the SAME ALIAS is already declared then it overrides #pragma weak
112 // resulting in a non-weak alias in this case
114 #pragma weak both = __both
124 #pragma weak both2 = __both2
128 ///////////// ensure that #pragma weak does not alter existing __attributes()
131 #pragma weak a1 = __a1
135 #pragma weak xxx = __xxx
139 ///////////// PR10878: Make sure we can call a weak alias
141 #pragma weak SHA384Pad = SHA512Pad
146 // PR14046: Parse #pragma weak in function-local context
149 #pragma weak PR14046e in PR14046f()
154 // Parse #pragma weak after a label or case statement
161 #pragma weak PR16705a in PR16705f()
164 #pragma weak PR16705b in PR16705f()
168 #pragma weak PR16705c in PR16705f()
181 // #pragma weak must appear before or within the same TopLevelDecl as it
185 #pragma weak yyy
186 // NOTE: weak doesn't apply, not before or in same TopLevelDec(!)