mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-17 15:36:49 +00:00

While printing functions, expand --print-only flag to accept section names. E.g., "--print-only=\.init" will only print functions from ".init" section.
30 lines
609 B
ArmAsm
30 lines
609 B
ArmAsm
## Check that --print-only flag works with sections.
|
|
|
|
# REQUIRES: system-linux
|
|
|
|
# RUN: llvm-mc -filetype=obj -triple x86_64-unknown-linux %s -o %t.o
|
|
# RUN: ld.lld %t.o -o %t.exe
|
|
# RUN: llvm-bolt %t.exe -o %t.out --print-cfg --print-only=unused_code 2>&1 \
|
|
# RUN: | FileCheck %s
|
|
|
|
# CHECK: Binary Function "foo"
|
|
# CHECK-NOT: Binary Function "_start"
|
|
|
|
.text
|
|
.globl _start
|
|
.type _start, %function
|
|
_start:
|
|
.cfi_startproc
|
|
ret
|
|
.cfi_endproc
|
|
.size _start, .-_start
|
|
|
|
.section unused_code,"ax",@progbits
|
|
.globl foo
|
|
.type foo, %function
|
|
foo:
|
|
.cfi_startproc
|
|
ret
|
|
.cfi_endproc
|
|
.size foo, .-foo
|