|
7 | 7 | # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/has-swift.s -o %t/has-swift.o
|
8 | 8 | # RUN: llvm-as %t/has-swift-ir-loaded.ll -o %t/has-swift-ir-loaded.o
|
9 | 9 | # RUN: llvm-as %t/has-swift-ir-not-loaded.ll -o %t/has-swift-ir-not-loaded.o
|
| 10 | +# RUN: llvm-as %t/has-swift-with-space-ir-loaded.ll -o %t/has-swift-with-space-ir-loaded.o |
10 | 11 | # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/has-swift-proto.s -o %t/has-swift-proto.o
|
11 | 12 | # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/no-objc.s -o %t/no-objc.o
|
12 | 13 | ## Make sure we don't mis-parse a 32-bit file as 64-bit
|
13 | 14 | # RUN: llvm-mc -filetype=obj -triple=armv7-apple-watchos %t/no-objc.s -o %t/wrong-arch.o
|
14 |
| -# RUN: llvm-ar rcs %t/libHasSomeObjC.a %t/no-objc.o %t/has-objc-symbol.o %t/has-objc-category.o %t/has-swift.o %t/has-swift-proto.o %t/has-swift-ir-loaded.o %t/has-swift-ir-not-loaded.o %t/wrong-arch.o |
15 |
| -# RUN: llvm-ar rcs %t/libHasSomeObjC2.a %t/no-objc.o %t/has-objc-symbol-and-category.o %t/has-swift.o %t/has-swift-proto.o %t/has-swift-ir-loaded.o %t/has-swift-ir-not-loaded.o %t/wrong-arch.o |
| 15 | +# RUN: llvm-ar rcs %t/libHasSomeObjC.a %t/no-objc.o %t/has-objc-symbol.o %t/has-objc-category.o %t/has-swift.o %t/has-swift-proto.o %t/has-swift-ir-loaded.o %t/has-swift-ir-not-loaded.o %t/has-swift-with-space-ir-loaded.o %t/wrong-arch.o |
| 16 | +# RUN: llvm-ar rcs %t/libHasSomeObjC2.a %t/no-objc.o %t/has-objc-symbol-and-category.o %t/has-swift.o %t/has-swift-proto.o %t/has-swift-ir-loaded.o %t/has-swift-ir-not-loaded.o %t/has-swift-with-space-ir-loaded.o %t/wrong-arch.o |
16 | 17 |
|
17 | 18 | # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/test.s -o %t/test.o
|
18 | 19 |
|
|
22 | 23 | # RUN: %lld -lSystem %t/test.o -o %t/test -L%t -lHasSomeObjC2 -ObjC
|
23 | 24 | # RUN: llvm-objdump --section-headers --syms %t/test | FileCheck %s --check-prefix=OBJC
|
24 | 25 |
|
25 |
| -# RUN: %no-fatal-warnings-lld -lSystem %t/test.o -o %t/test --start-lib %t/no-objc.o %t/has-objc-symbol.o %t/has-objc-category.o %t/has-swift.o %t/has-swift-proto.o %t/has-swift-ir-loaded.o %t/has-swift-ir-not-loaded.o %t/wrong-arch.o --end-lib -ObjC 2>&1 \ |
| 26 | +# RUN: %no-fatal-warnings-lld -lSystem %t/test.o -o %t/test --start-lib %t/no-objc.o %t/has-objc-symbol.o %t/has-objc-category.o %t/has-swift.o %t/has-swift-proto.o %t/has-swift-ir-loaded.o %t/has-swift-ir-not-loaded.o %t/has-swift-with-space-ir-loaded.o %t/wrong-arch.o --end-lib -ObjC 2>&1 \ |
26 | 27 | # RUN: | FileCheck -check-prefix=WARNING %s
|
27 | 28 | # RUN: llvm-objdump --section-headers --syms %t/test | FileCheck %s --check-prefix=OBJC
|
28 | 29 |
|
|
34 | 35 | # OBJC-NEXT: 0 __text {{.*}} TEXT
|
35 | 36 | # OBJC-NEXT: 1 __swift {{.*}} DATA
|
36 | 37 | # OBJC-NEXT: 2 __swift5_fieldmd{{.*}} DATA
|
37 |
| -# OBJC-NEXT: 3 __objc_catlist {{.*}} DATA |
38 |
| -# OBJC-NEXT: 4 has_objc_symbol {{.*}} DATA |
| 38 | +# OBJC-NEXT: 3 __swift5_proto {{.*}} DATA |
| 39 | +# OBJC-NEXT: 4 __objc_catlist {{.*}} DATA |
| 40 | +# OBJC-NEXT: 5 has_objc_symbol {{.*}} DATA |
39 | 41 | # OBJC-EMPTY:
|
40 | 42 | # OBJC-NEXT: SYMBOL TABLE:
|
41 | 43 | # OBJC-DAG: g O __TEXT,__swift _foo
|
42 | 44 | # OBJC-DAG: g F __TEXT,__text _main
|
43 | 45 | # OBJC-DAG: g F __TEXT,__text _OBJC_CLASS_$_MyObject
|
44 | 46 | # OBJC-DAG: g O __TEXT,__swift5_fieldmd $s7somelib4Blah_pMF
|
| 47 | +# OBJC-DAG: g O __TEXT,__swift5_proto _baz |
45 | 48 |
|
46 | 49 | # RUN: %lld -lSystem %t/test.o -o %t/test -L%t -lHasSomeObjC
|
47 | 50 | # RUN: llvm-objdump --section-headers --syms %t/test | FileCheck %s --check-prefix=NO-OBJC
|
@@ -117,6 +120,13 @@ target triple = "x86_64-apple-darwin"
|
117 | 120 | @bar = global i64 1234
|
118 | 121 | @llvm.used = appending global [1 x ptr] [ptr @bar]
|
119 | 122 |
|
| 123 | +#--- has-swift-with-space-ir-loaded.ll |
| 124 | +target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128" |
| 125 | +target triple = "x86_64-apple-darwin" |
| 126 | + |
| 127 | +@baz = global i64 1234, section "__TEXT, __swift5_proto" |
| 128 | +@llvm.used = appending global [1 x ptr] [ptr @baz] |
| 129 | + |
120 | 130 | #--- has-swift-proto.s
|
121 | 131 | .section __TEXT,__swift5_fieldmd
|
122 | 132 | .globl $s7somelib4Blah_pMF
|
|
0 commit comments