func.ifs
1.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# RUN: %clang -emit-interface-stubs -o - %s %S/object.ifs -emit-merged-ifs | \
# RUN: FileCheck %s --check-prefixes=CHECK-IFS
# RUN: %clang -emit-interface-stubs -o - %s %S/object.ifs | llvm-readelf --all | \
# RUN: FileCheck %s --check-prefixes=CHECK-ELF
# RUN: %clang -emit-interface-stubs -o - %s %s -emit-merged-ifs | \
# RUN: FileCheck %s --check-prefixes=CHECK-MERGE-IFS
# CHECK-IFS: --- !experimental-ifs-v1
# CHECK-IFS-NEXT: IfsVersion: 1.0
# CHECK-IFS-NEXT: Triple: x86_64-linux-gnu
# CHECK-IFS-NEXT: ObjectFileFormat: ELF
# CHECK-IFS-NEXT: Symbols:
# CHECK-IFS-DAG: a: { Type: Func }
# CHECK-IFS-DAG: b: { Type: Object, Size: 4 }
# CHECK-IFS: ...
# CHECK-ELF: ELF Header:
# CHECK-ELF: Class: ELF64
# CHECK-ELF: Type: DYN (Shared object file)
# CHECK-ELF: FUNC GLOBAL DEFAULT 1 a
# CHECK-ELF: OBJECT GLOBAL DEFAULT 1 b
# Here we are testing to see if two identical symbols will merge.
# CHECK-MERGE-IFS: --- !experimental-ifs-v1
# CHECK-MERGE-IFS-NEXT: IfsVersion: 1.0
# CHECK-MERGE-IFS-NEXT: Triple: x86_64-linux-gnu
# CHECK-MERGE-IFS-NEXT: ObjectFileFormat: ELF
# CHECK-MERGE-IFS-NEXT: Symbols:
# CHECK-MERGE-IFS-NEXT: a: { Type: Func }
# CHECK-MERGE-IFS-NEXT: ...
--- !experimental-ifs-v1
IfsVersion: 1.0
Triple: x86_64-linux-gnu
ObjectFileFormat: ELF
Symbols:
a: { Type: Func }
...