llvm/clang/test/InterfaceStubs/func.ifs

# 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: --- !ifs-v1
# CHECK-IFS-NEXT: IfsVersion: 3.0
# CHECK-IFS-NEXT: Target:          x86_64-linux-gnu
# CHECK-IFS-NEXT: Symbols:
# CHECK-IFS-DAG:   - { Name: a, Type: Func }
# CHECK-IFS-DAG:   - { Name: 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: --- !ifs-v1
# CHECK-MERGE-IFS-NEXT: IfsVersion: 3.0
# CHECK-MERGE-IFS-NEXT: Target:          x86_64-linux-gnu
# CHECK-MERGE-IFS-NEXT: Symbols:
# CHECK-MERGE-IFS-NEXT:   - { Name: a, Type: Func }
# CHECK-MERGE-IFS-NEXT: ...

--- !ifs-v1
IfsVersion: 3.0
Target: x86_64-linux-gnu
Symbols:
  - { Name: a, Type: Func }
...