Home
last modified time | relevance | path

Searched refs:weak (Results 1 – 25 of 971) sorted by relevance

12345678910>>...39

/llvm-project-15.0.7/clang/test/CodeGen/
H A Dpragma-weak.c30 #pragma weak weakvar
33 #pragma weak weakdef
45 #pragma weak foo = __foo
101 #pragma weak mix
135 #pragma weak a1 = __a1
139 #pragma weak xxx = __xxx
162 #pragma weak PR14046e in PR14046f()
174 #pragma weak PR16705a in PR16705f()
177 #pragma weak PR16705b in PR16705f()
181 #pragma weak PR16705c in PR16705f()
[all …]
/llvm-project-15.0.7/clang/test/Driver/
H A Dobjc-weak.m4 // RUN: %clang -target x86_64-apple-macosx10.7 -S -### %s -fno-objc-weak -fobjc-weak -fobjc-arc 2>…
6 // ARC-WEAK: -fobjc-weak
9 // RUN: %clang -target x86_64-apple-macos10.7 -S -### %s -fobjc-weak -fno-objc-weak -fobjc-arc 2>&…
11 // ARC-NO-WEAK: -fno-objc-weak
14 // RUN: %clang -target x86_64-apple-macosx10.5 -S -### %s -fno-objc-weak -fobjc-weak -fobjc-arc 2>…
15 // ARC-WEAK-NOTSUPPORTED: error: -fobjc-weak is not supported on the current deployment target
18 // RUN: %clang -target x86_64-apple-macos10.7 -S -### %s -fno-objc-weak -fobjc-weak 2>&1 | FileChec…
19 // MRC-WEAK: -fobjc-weak
22 // RUN: %clang -target x86_64-apple-macosx10.7 -S -### %s -fobjc-weak -fno-objc-weak 2>&1 | FileChe…
23 // MRC-NO-WEAK: -fno-objc-weak
[all …]
/llvm-project-15.0.7/lld/test/MachO/
H A Dweak-definition-direct-fetch.s4 ## This test exercises the various possible combinations of weak and non-weak
8 # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/weak-refs-foo.s -o %t/weak-refs-foo.o
35 # PREFER-WEAK-OBJECT: O __TEXT,weak _foo
42 ## For dylibs and object files, the non-weak symbol always wins. But the weak
63 # RUN: %lld -lSystem -o %t/weak-dylib-weak-ar -L%t -lweakfoo %t/weakfoo.a %t/refs-foo.o
64 # RUN: llvm-objdump --macho --lazy-bind --syms %t/weak-dylib-weak-ar | FileCheck %s --check-prefix=…
65 # RUN: %lld -lSystem -o %t/weak-ar-weak-dylib -L%t %t/weakfoo.a -lweakfoo %t/refs-foo.o
68 # RUN: %lld -lSystem -o %t/weak-dylib-weak-ar -L%t -lweakfoo --start-lib %t/weakfoo.o --end-lib %t/…
70 # RUN: %lld -lSystem -o %t/weak-ar-weak-dylib -L%t --start-lib %t/weakfoo.o --end-lib -lweakfoo %t/…
80 # RUN: %lld -lSystem -o %t/weak-dylib-weak-obj -L%t -lweakfoo %t/weakfoo.o %t/refs-foo.o
[all …]
H A Dweak-def-can-be-hidden.s5 # RUN: %t/weak-foo.s -o %t/weak-foo.o
8 # RUN: %t/weak-autohide-foo.s -o %t/weak-autohide-foo.o
11 # RUN: %t/weak-foo-pe.s -o %t/weak-foo-pe.o
14 # RUN: %t/weak-autohide-foo-pe.s -o %t/weak-autohide-foo-pe.o
36 ## ld64 doesn't treat .weak_def_can_be_hidden as weak symbols in the
37 ## exports trie or bind tables, but it claims they are weak in the symbol
39 ## weak-private-extern.s. These FileCheck lines match both outputs.
63 # RUN: %lld -dylib -o %t/weak-autohide-foo-pe.dylib \
64 # RUN: %t/weak-autohide-foo-pe.o %t/ref-foo.o
67 # RUN: llvm-nm -m %t/weak-autohide-foo-pe.dylib | \
[all …]
H A Dweak-definition-gc.s4 ## This tests that if two input files define the same weak symbol, we only
8 # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/weak-sub.s -o %t/weak-sub.o
9 # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/weak-nosub.s -o %t/weak-nosub.o
11 ## Test that weak symbols are emitted just once with .subsections_via_symbols
12 # RUN: %lld -dylib -o %t/out.dylib %t/weak-sub.o %t/weak-sub.o
14 # RUN: %lld -dylib -o %t/out.dylib %t/weak-nosub.o %t/weak-sub.o
16 # RUN: %lld -dylib -o %t/out.dylib %t/weak-sub.o %t/weak-nosub.o
25 ## We can even strip weak symbols without subsections_via_symbols as long
26 ## as none of the weak symbols in a section are needed.
27 # RUN: %lld -dylib -o %t/out.dylib %t/weak-nosub.o %t/weak-nosub.o
[all …]
H A Dweak-import.s4 # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/weak-ref-only.s -o %t/weak-ref-only.o
5 # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/weak-ref-sub-library.s -o %t/weak-ref-s…
9 # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/weak-reexport.s -o %t/weak-reexport.o
16 # RUN: %lld -weak-lSystem %t/test.o \
20 # RUN: %lld -lSystem -dylib %t/libfoo.dylib %t/weak-ref-only.o -o %t/weak-ref-only
22 # RUN: %lld -lSystem -dylib %t/libfoo.dylib %t/weak-ref-sub-library.o -o %t/weak-ref-sub-library
33 ## Check that reexported symbols from weak libraries are also weakly-referenced.
34 # RUN: %lld -weak-lc++ %t/weak-reexport.o -o %t/weak-reexport.out
67 #--- weak-ref-only.s
72 #--- weak-ref-sub-library.s
[all …]
H A DU-dynamic-lookup.s9 # _foo starts out as a (non-weak) dynamically looked up symbol and is merged
52 # Test resolving dynamic lookup symbol with weak defined.
53 # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-macos -o %t/weak-foo.o %t/weak-foo.s
54 # RUN: %lld -dylib -o %t/weak-foo.dylib %t/weak-foo.o -U _foo
55 # RUN: llvm-objdump --macho --bind --lazy-bind --weak-bind %t/weak-foo.dylib | FileCheck --check-pr…
56 # RUN: llvm-nm -m %t/weak-foo.dylib | FileCheck --check-prefix=WEAKDEFSYM %s
58 # WEAKDEFSYM: weak external _foo
61 # RUN: %lld -lSystem %t/main.o %t/weak-foo.dylib -U _foo -o %t/out
68 # TWOLEVELWEAK-NOT: weak-foo _foo
72 # TWOLEVELWEAKSYM: (undefined) weak external _foo (from weak-foo)
[all …]
H A Dlto-symbol-resolution.ll6 ; RUN: opt -module-summary %t/weak-defined.ll -o %t/weak-defined.o
9 ; RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/weak-defined.s -o %t/weak-defined-asm.o
12 ; RUN: %lld -lSystem -dylib %t/weak-defined.o -o %t/libweakfoo.dylib
16 ;; Regular defined symbols take precedence over weak ones.
22 ;; Regular defined symbols take precedence over weak non-bitcode ones.
31 ; RUN: %lld -lSystem %t/weak-defined.o %t/weak-defined-asm.o %t/calls-foo.o -o %t/test
34 ; RUN: %lld -lSystem %t/weak-defined-asm.o %t/weak-defined.o %t/calls-foo.o -o %t/test
55 ;; Archive symbols take precedence over weak dylib symbols.
75 ;--- weak-defined.ll
79 define weak void @foo() section "__TEXT,weak_defined" {
[all …]
H A Dcommon-symbol-resolution.s5 # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/weak-common.s -o %t/weak-common.o
7 # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/weak-defined.s -o %t/weak-defined.o
15 # RUN: llvm-ar rcs %t/weak-defined-and-common.a %t/weak-defined.o %t/common.o
16 # RUN: llvm-ar rcs %t/common-and-weak-defined.a %t/common.o %t/weak-defined.o
18 ## The weak attribute appears to have no effect on common symbols. Given two
20 ## regardless of whether it is weak. Moreover, the resolved symbol in the output
21 ## file will always be non-weak, even if the winning input symbol definition was
22 ## weak.
23 # RUN: %lld -lSystem -order_file %t/order %t/common.o %t/weak-common.o %t/test.o -o %t/test
76 #--- weak-common.s
[all …]
/llvm-project-15.0.7/clang/test/Parser/
H A Dpragma-weak.c7 /* expected-warning {{expected identifier in '#pragma weak'}}*/ #pragma weak
8 #pragma weak x
11 /* expected-warning {{expected identifier in '#pragma weak'}}*/ #pragma weak z = =
12 /* expected-warning {{expected identifier in '#pragma weak'}}*/ #pragma weak z =
13 /* expected-warning {{weak identifier 'y' never declared}} */ #pragma weak z = y
16 /* expected-warning {{extra tokens at end of '#pragma weak'}}*/ #pragma weak a b
26 #pragma weak t in pragma_is_not_a_statement()
28 #pragma weak t in pragma_is_not_a_statement()
33 #pragma weak t in pragma_is_not_a_statement()
37 #pragma weak t in pragma_is_not_a_statement()
[all …]
/llvm-project-15.0.7/llvm/test/CodeGen/X86/
H A Dcoff-weak.ll4 ; X86: .weak _foo
5 ; X64: .weak foo
6 define weak void @foo() {
10 ; X86: .weak _bar
11 ; X64: .weak bar
16 ; X86-NOT: .weak _bar_comdat
17 ; X64-NOT: .weak bar_comdat
24 ; X86: .weak _baz
25 ; X64: .weak baz
38 ; X86: .weak _quux
[all …]
/llvm-project-15.0.7/clang/test/SemaCXX/
H A Dattr-weak.cpp3 static int test0 __attribute__((weak)); // expected-error {{weak declaration cannot have internal l…
4 static void test1() __attribute__((weak)); // expected-error {{weak declaration cannot have interna…
6 namespace test2 __attribute__((weak)) { // expected-warning {{'weak' attribute only applies to vari…
10 …int test3 __attribute__((weak)); // expected-error {{weak declaration cannot have internal linkage…
11 …void test4() __attribute__((weak)); // expected-error {{weak declaration cannot have internal link…
15 static void test5() __attribute__((weak)); // no error
20 …static void test6() __attribute__((weak)); // expected-error {{weak declaration cannot have intern…
29 void test7() __attribute__((weak)) {} in test7()
30 static int var __attribute__((weak));
38 class __attribute__((weak)) Test8 {}; // OK
[all …]
/llvm-project-15.0.7/llvm/test/Linker/
H A Dunnamed-addr1-a.ll9 define weak void @func-a() { ret void }
10 ; CHECK-DAG: define weak void @func-a() {
26 @global-f = weak global i32 42
29 @alias-a = weak global i32 42
31 @alias-b = weak unnamed_addr global i32 42
40 ; CHECK-DAG: define weak void @func-c() {
41 define weak void @func-d() { ret void }
42 ; CHECK-DAG: define weak void @func-d() {
53 @global-j = weak global i32 42
56 @alias-c = weak global i32 42
[all …]
/llvm-project-15.0.7/lld/test/COFF/
H A Dgnu-weak.test3 GNU ld can handle several definitions of the same weak symbol, and
5 weak definition encountered.
17 $ cat gnu-weak.c
18 void weakfunc(void) __attribute__((weak));
21 __attribute__((weak)) void weakfunc() {
36 void weakfunc(void) __attribute__((weak));
38 __attribute__((weak)) void weakfunc() {
44 $ x86_64-w64-mingw32-gcc -c -O2 gnu-weak.c
47 $ x86_64-w64-mingw32-nm gnu-weak.o | grep weakfunc
48 0000000000000000 T .weak.weakfunc.main
[all …]
/llvm-project-15.0.7/llvm/test/CodeGen/XCore/
H A Dlinkage.ll3 ; CHECK: .weak fd
4 define weak void @fd() {
23 ; CHECK: .weak array.globound
25 ; CHECK: .weak array
30 ; CHECK: .weak ac.globound
32 ; CHECK: .weak ac
36 ; CHECK: .weak gd
37 @gd = weak global i32 0
40 ; CHECK: .weak gc
45 ; CHECK: .weak fr
[all …]
/llvm-project-15.0.7/clang/test/Sema/
H A Dattr-weak.c3 extern int f0(void) __attribute__((weak));
4 extern int g0 __attribute__((weak));
6 int f2(void) __attribute__((weak));
7 int g2 __attribute__((weak));
13 struct __attribute__((weak)) s0 {}; // expected-warning {{'weak' attribute only applies to variable…
16 static int f(void) __attribute__((weak)); // expected-error {{weak declaration cannot have internal…
17 static int x __attribute__((weak)); // expected-error {{weak declaration cannot have internal linka…
24 extern int pr14946_x __attribute__((weak)); // expected-error {{weak declaration cannot have inter…
27 void pr14946_f(void) __attribute__((weak)); // expected-error {{weak declaration cannot have intern…
/llvm-project-15.0.7/compiler-rt/test/profile/Linux/
H A Dcoverage-weak-lld.cpp84 void weak() { puts("strong"); } in weak() function
85 void foo() { weak(); } in foo()
90 __attribute__((weak)) void weak() { puts("unreachable"); } in weak() function
91 void foo() { weak(); } in foo()
96 __attribute__((weak)) void weak() { puts("weak"); } in weak() function
101 weak(); in main()
/llvm-project-15.0.7/compiler-rt/test/profile/Windows/
H A Dcoverage-weak-lld.cpp68 void weak() { puts("strong"); } in weak() function
69 void foo() { weak(); } in foo()
74 __attribute__((weak)) void weak() { puts("unreachable"); } in weak() function
75 void foo() { weak(); } in foo()
80 __attribute__((weak)) void weak() { puts("weak"); } in weak() function
85 weak(); in main()
/llvm-project-15.0.7/llvm/test/CodeGen/PowerPC/
H A DPR3488.ll4 module asm "\09.weak\09__crc_numa_node\09"
8 module asm "\09.weak\09__crc__numa_mem_\09"
12 module asm "\09.weak\09__crc_node_states\09"
16 module asm "\09.weak\09__crc_totalram_pages\09"
20 module asm "\09.weak\09__crc_movable_zone\09"
24 module asm "\09.weak\09__crc_nr_node_ids\09"
28 module asm "\09.weak\09__crc_nr_online_nodes\09"
32 module asm "\09.weak\09__crc_split_page\09"
48 module asm "\09.weak\09__crc___free_pages\09"
52 module asm "\09.weak\09__crc_free_pages\09"
[all …]
/llvm-project-15.0.7/llvm/test/Linker/Inputs/
H A Dvisibility.ll4 @v1 = weak hidden global i32 0
5 @v2 = weak protected global i32 0
6 @v3 = weak hidden global i32 0
10 @a1 = weak hidden alias i32, i32* @v1
11 @a2 = weak protected alias i32, i32* @v2
12 @a3 = weak hidden alias i32, i32* @v3
15 define weak hidden void @f1() {
19 define weak protected void @f2() {
23 define weak hidden void @f3() {
/llvm-project-15.0.7/llvm/test/MC/ELF/
H A Dsymbol-binding-changed.s8 ## `.globl x; .weak x` matches the GNU as behavior. We issue a warning for now.
12 .weak global
14 # CHECK: {{.*}}.s:[[#@LINE+3]]:1: error: weak changed binding to STB_LOCAL
15 weak: label
16 .weak weak
17 .local weak
27 .weak multi_weak
28 .weak multi_weak
/llvm-project-15.0.7/lld/test/ELF/Inputs/
H A Dresolution.s3 .weak RegularWeak_with_RegularWeak
11 .weak RegularStrong_with_RegularWeak
15 .weak RegularWeak_with_UndefWeak
22 .weak RegularStrong_with_UndefWeak
33 .weak UndefWeak_with_RegularWeak
41 .weak UndefStrong_with_RegularWeak
49 .weak UndefWeak_with_UndefWeak
57 .weak CommonStrong_with_RegularWeak
65 .weak CommonStrong_with_UndefWeak
/llvm-project-15.0.7/lld/test/ELF/
H A Dresolution.s43 .weak RegularWeak_with_RegularWeak
47 .weak RegularWeak_with_RegularStrong
55 .weak RegularWeak_with_UndefWeak
59 .weak RegularWeak_with_UndefStrong
71 .weak RegularWeak_with_CommonStrong
79 .weak UndefWeak_with_RegularWeak
83 .weak UndefWeak_with_RegularStrong
93 .weak UndefWeak_with_UndefWeak
97 .weak UndefWeak_with_CommonStrong
/llvm-project-15.0.7/clang/test/SemaObjC/
H A Dweak-property.m1 // RUN: %clang_cc1 -fsyntax-only -fobjc-runtime-has-weak -fobjc-arc -verify -Wno-objc-root-class %s
9 @property (weak) id value1;
13 @property (weak, assign) id v1; // expected-error {{property attributes 'assign' and 'weak' are mu…
14 @property (weak, copy) id v2; // expected-error {{property attributes 'copy' and 'weak' are mutuall…
15 @property (weak, retain) id v3; // expected-error {{property attributes 'retain' and 'weak' are mut…
16 @property (weak, assign) id v4; // expected-error {{property attributes 'assign' and 'weak' are mu…
H A Darc-unavailable-for-weakref.m1 // RUN: %clang_cc1 -triple x86_64-apple-darwin11 -fobjc-runtime-has-weak -fsyntax-only -fobjc-arc -…
2 // RUN: %clang_cc1 -triple x86_64-apple-darwin11 -fobjc-runtime-has-weak -fsyntax-only -fobjc-weak
18 …ns1 = (__weak sub *)obj; // expected-error {{assignment of a weak-unavailable object to a __weak o…
32 weak1 = strong1; // expected-error {{assignment of a weak-unavailable object to a __weak object}}
34 …__weak id weak2 = strong1; // expected-error {{assignment of a weak-unavailable object to a __weak…
35 …return (__weak id)strong1; // expected-error {{cast of weak-unavailable object of type 'NOWEAK *' …
45 weak1 = strong1; // expected-error {{assignment of a weak-unavailable object to a __weak object}}
47 …__weak id<P> weak2 = strong1; // expected-error {{assignment of a weak-unavailable object to a __w…
60 @property (weak) NSFont *font; // expected-error {{synthesizing __weak instance variable of type 'N…
69 @property (weak) NSFont *font; // expected-error {{synthesizing __weak instance variable of type 'N…
[all …]

12345678910>>...39