[profile] Specify "-V" to otool to get expected test output

Newer Xcode toolchains ship a new otool implementation that prints out
section contents in a slightly different way than otool-classic. Specify
"-V" to otool to get the expected test output.

Differential Revision: https://reviews.llvm.org/D108929
This commit is contained in:
Vedant Kumar 2021-08-31 10:49:27 -07:00
parent c96839265a
commit 6c439a3817
1 changed files with 6 additions and 6 deletions

View File

@ -7,8 +7,8 @@
// RUN: llvm-profdata show --all-functions %t.profdata | FileCheck %s -check-prefix=PROF
// RUN: llvm-cov show %t -instr-profile %t.profdata | FileCheck %s -check-prefix=COV
// RUN: nm %t | FileCheck %s -check-prefix=NM
// RUN: otool -s __DATA __llvm_prf_names %t | FileCheck %s -check-prefix=PRF_NAMES
// RUN: otool -s __DATA __llvm_prf_cnts %t | FileCheck %s -check-prefix=PRF_CNTS
// RUN: otool -V -s __DATA __llvm_prf_names %t | FileCheck %s -check-prefix=PRF_NAMES
// RUN: otool -V -s __DATA __llvm_prf_cnts %t | FileCheck %s -check-prefix=PRF_CNTS
// RUN: %clang_lto_profgen=%t.lto.profraw -fcoverage-mapping -mllvm -enable-name-compression=false -DCODE=1 -Wl,-dead_strip -flto -o %t.lto %s
// RUN: %run %t.lto
@ -16,8 +16,8 @@
// RUN: llvm-profdata show --all-functions %t.lto.profdata | FileCheck %s -check-prefix=PROF
// RUN: llvm-cov show %t.lto -instr-profile %t.lto.profdata | FileCheck %s -check-prefix=COV
// RUN: nm %t.lto | FileCheck %s -check-prefix=NM
// RUN: otool -s __DATA __llvm_prf_names %t.lto | FileCheck %s -check-prefix=PRF_NAMES
// RUN: otool -s __DATA __llvm_prf_cnts %t.lto | FileCheck %s -check-prefix=PRF_CNTS
// RUN: otool -V -s __DATA __llvm_prf_names %t.lto | FileCheck %s -check-prefix=PRF_NAMES
// RUN: otool -V -s __DATA __llvm_prf_cnts %t.lto | FileCheck %s -check-prefix=PRF_CNTS
// Note: We expect foo() and some of the profiling data associated with it to
// be dead-stripped.
@ -58,7 +58,7 @@ int main() { return 0; }
// together.
// PRF_NAMES: Contents of (__DATA,__llvm_prf_names) section
// PRF_NAMES-NEXT: {{.*}} 08 00 66 6f 6f 01 6d 61 69 6e{{ +$}}
// PRF_NAMES-NEXT: {{.*}} 08 00 66 6f 6f 01 6d 61 69 6e
// | | f o o # m a i n
// | |___________|
// | |
@ -70,4 +70,4 @@ int main() { return 0; }
// dead-stripped.
// PRF_CNTS: Contents of (__DATA,__llvm_prf_cnts) section
// PRF_CNTS-NEXT: {{.*}} 00 00 00 00 00 00 00 00{{ +$}}
// PRF_CNTS-NEXT: {{.*}} 00 00 00 00 00 00 00 00