1 ## Test that only debug sections are kept with --only-keep-debug.
2 # RUN: yaml2obj %s -o %t
3 # RUN: llvm-strip --only-keep-debug %t
4 # RUN: obj2yaml %t | FileCheck %s
6 ## Test that keep-section overrides only-keep-debug.
7 # RUN: yaml2obj %s -o %t
8 # RUN: llvm-strip --only-keep-debug --keep-section=foo %t
9 # RUN: obj2yaml %t | FileCheck --implicit-check-not=Name --check-prefix=CHECK --check-prefix=KEEP %s
12 # CHECK: - Type: CUSTOM
13 # CHECK-NEXT: Name: .debug_info
14 # CHECK: - Type: CUSTOM
15 # CHECK-NEXT: Name: .debug_line
18 ## Test that remove-section overrides only-keep-debug.
19 # RUN: yaml2obj %s -o %t
20 # RUN: llvm-strip --only-keep-debug --remove-section=.debug_info %t
21 # RUN: obj2yaml %t | FileCheck %s --check-prefix=NOINFO --implicit-check-not=.debug_info
23 # NOINFO: Name: .debug_line