26 lines · plain
1# Verify if `--print-only` and `--print-only-files` work fine.2 3# REQUIRES: system-linux4 5# RUN: %clang %cflags -x c %p/Inputs/bolt_icf.cpp -o %t -Wl,-q6# RUN: llvm-bolt %t -o %t.bolt --icf=none --print-cfg \7# RUN: --print-only=foo.*,bar.*,main.* 2>&1 | FileCheck %s8 9# RUN: echo "bar.*" > %t.pof10# RUN: echo "main.*" >> %t.pof11# RUN: llvm-bolt %t -o %t.bolt --icf=none --print-cfg \12# RUN: --print-only=foo.* --print-only-file=%t.pof \13# RUN: 2>&1 | FileCheck %s14 15# RUN: echo "foo.*" >> %t.pof16# RUN: llvm-bolt %t -o %t.bolt --icf=none --print-cfg \17# RUN: --print-only-file=%t.pof 2>&1 | FileCheck %s18 19# CHECK-NOT: Binary Function "fiz" after building cfg20# CHECK-NOT: Binary Function "faz" after building cfg21# CHECK-NOT: Binary Function "zip" after building cfg22# CHECK-NOT: Binary Function "zap" after building cfg23# CHECK: Binary Function "foo" after building cfg24# CHECK: Binary Function "bar" after building cfg25# CHECK: Binary Function "main" after building cfg26