From 6c439a38172bbb3422b91517e69cd091ff34062c Mon Sep 17 00:00:00 2001 From: Vedant Kumar Date: Tue, 31 Aug 2021 10:49:27 -0700 Subject: [PATCH] [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 --- compiler-rt/test/profile/instrprof-darwin-dead-strip.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/compiler-rt/test/profile/instrprof-darwin-dead-strip.c b/compiler-rt/test/profile/instrprof-darwin-dead-strip.c index 6a2bffc..62f6660 100644 --- a/compiler-rt/test/profile/instrprof-darwin-dead-strip.c +++ b/compiler-rt/test/profile/instrprof-darwin-dead-strip.c @@ -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 -- 2.7.4