xref: /llvm-project/llvm/test/tools/dsymutil/X86/swift-ast-x86_64.test (revision f1fdfe6888f93b9f6dfb4689e1f3206de584ff5b)
1RUN: dsymutil -oso-prepend-path %p/.. %p/../Inputs/swift-ast.macho.x86_64 -o %T/swift-ast.dSYM -verbose -no-swiftmodule-timestamp | FileCheck %s --check-prefix=DSYMUTIL
2RUN: dsymutil -oso-prepend-path %p/.. %p/../Inputs/swift-ast.macho.x86_64 -o %T/swift-ast.dSYM -verbose | FileCheck %s --check-prefix=DSYMUTIL
3RUN: llvm-readobj --sections --section-data %T/swift-ast.dSYM/Contents/Resources/DWARF/swift-ast.macho.x86_64 | FileCheck %s --check-prefix=READOBJ
4RUN: llvm-dwarfdump --show-section-sizes %T/swift-ast.dSYM/Contents/Resources/DWARF/swift-ast.macho.x86_64 | FileCheck %s --check-prefix=DWARFDUMP
5
6RUN: dsymutil --linker parallel -oso-prepend-path %p/.. %p/../Inputs/swift-ast.macho.x86_64 -o %T/swift-ast.dSYM -verbose -no-swiftmodule-timestamp | FileCheck %s --check-prefix=DSYMUTIL
7RUN: dsymutil --linker parallel -oso-prepend-path %p/.. %p/../Inputs/swift-ast.macho.x86_64 -o %T/swift-ast.dSYM -verbose | FileCheck %s --check-prefix=DSYMUTIL
8RUN: llvm-readobj --sections --section-data %T/swift-ast.dSYM/Contents/Resources/DWARF/swift-ast.macho.x86_64 | FileCheck %s --check-prefix=READOBJ
9RUN: llvm-dwarfdump --show-section-sizes %T/swift-ast.dSYM/Contents/Resources/DWARF/swift-ast.macho.x86_64 | FileCheck %s --check-prefix=DWARFDUMP
10
11
12The tested object file has been created by the dummy Swift code:
13let x = 1
14
15Compiled with:
16  swiftc /tmp/test.swift -Onone -target x86_64-apple-macosx10.9 -c
17  ld swift-ast.o -add_ast_path Inputs/swift-ast.swiftmodule -arch x86_64 -lSystem -macosx_version_min 10.9.0
18
19DSYMUTIL: filename:{{.*}}swift-ast.swiftmodule
20DSYMUTIL-NOT: The file was not recognized as a valid object file
21DSYMUTIL-NOT: timestamp mismatch
22DSYMUTIL: DEBUG MAP OBJECT:{{.*}}swift-ast.swiftmodule
23
24READOBJ: Name:{{.*}}__swift_ast
25READOBJ: |SWIFTMODULE DATA|
26READOBJ-NEXT: |.|
27
28DWARFDUMP: __swift_ast
29
30RUN: dsymutil -s %T/swift-ast.dSYM/Contents/Resources/DWARF/swift-ast.macho.x86_64 | FileCheck %s --check-prefix=NAST
31NAST-NOT: N_AST
32