|
5 | 5 | # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/has-objc-category.s -o %t/has-objc-category.o
|
6 | 6 | # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/has-objc-symbol-and-category.s -o %t/has-objc-symbol-and-category.o
|
7 | 7 | # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/has-swift.s -o %t/has-swift.o
|
| 8 | +# RUN: llvm-as %t/has-swift-ir-loaded.ll -o %t/has-swift-ir-loaded.o |
| 9 | +# RUN: llvm-as %t/has-swift-ir-not-loaded.ll -o %t/has-swift-ir-not-loaded.o |
8 | 10 | # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/has-swift-proto.s -o %t/has-swift-proto.o
|
9 | 11 | # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/no-objc.s -o %t/no-objc.o
|
10 | 12 | ## Make sure we don't mis-parse a 32-bit file as 64-bit
|
11 | 13 | # RUN: llvm-mc -filetype=obj -triple=armv7-apple-watchos %t/no-objc.s -o %t/wrong-arch.o
|
12 |
| -# 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/wrong-arch.o |
13 |
| -# 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/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 |
14 | 16 |
|
15 | 17 | # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/test.s -o %t/test.o
|
16 | 18 |
|
|
20 | 22 | # RUN: %lld -lSystem %t/test.o -o %t/test -L%t -lHasSomeObjC2 -ObjC
|
21 | 23 | # RUN: llvm-objdump --section-headers --syms %t/test | FileCheck %s --check-prefix=OBJC
|
22 | 24 |
|
23 |
| -# 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/wrong-arch.o --end-lib -ObjC 2>&1 \ |
| 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 \ |
24 | 26 | # RUN: | FileCheck -check-prefix=WARNING %s
|
25 | 27 | # RUN: llvm-objdump --section-headers --syms %t/test | FileCheck %s --check-prefix=OBJC
|
26 | 28 |
|
|
36 | 38 | # OBJC-NEXT: 4 has_objc_symbol {{.*}} DATA
|
37 | 39 | # OBJC-EMPTY:
|
38 | 40 | # OBJC-NEXT: SYMBOL TABLE:
|
| 41 | +# OBJC-DAG: g O __TEXT,__swift _foo |
39 | 42 | # OBJC-DAG: g F __TEXT,__text _main
|
40 | 43 | # OBJC-DAG: g F __TEXT,__text _OBJC_CLASS_$_MyObject
|
41 | 44 | # OBJC-DAG: g O __TEXT,__swift5_fieldmd $s7somelib4Blah_pMF
|
@@ -100,6 +103,20 @@ _has_dup:
|
100 | 103 | .section __TEXT,__swift
|
101 | 104 | .quad 0x1234
|
102 | 105 |
|
| 106 | +#--- has-swift-ir-loaded.ll |
| 107 | +target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128" |
| 108 | +target triple = "x86_64-apple-darwin" |
| 109 | + |
| 110 | +@foo = global i64 1234, section "__TEXT,__swift" |
| 111 | +@llvm.used = appending global [1 x ptr] [ptr @foo] |
| 112 | + |
| 113 | +#--- has-swift-ir-not-loaded.ll |
| 114 | +target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128" |
| 115 | +target triple = "x86_64-apple-darwin" |
| 116 | + |
| 117 | +@bar = global i64 1234 |
| 118 | +@llvm.used = appending global [1 x ptr] [ptr @bar] |
| 119 | + |
103 | 120 | #--- has-swift-proto.s
|
104 | 121 | .section __TEXT,__swift5_fieldmd
|
105 | 122 | .globl $s7somelib4Blah_pMF
|
|
0 commit comments