[compiler-rt] 6c439a3 - [profile] Specify "-V" to otool to get expected test output

Vedant Kumar via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 31 10:49:59 PDT 2021


Author: Vedant Kumar
Date: 2021-08-31T10:49:51-07:00
New Revision: 6c439a38172bbb3422b91517e69cd091ff34062c

URL: https://github.com/llvm/llvm-project/commit/6c439a38172bbb3422b91517e69cd091ff34062c
DIFF: https://github.com/llvm/llvm-project/commit/6c439a38172bbb3422b91517e69cd091ff34062c.diff

LOG: [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

Added: 
    

Modified: 
    compiler-rt/test/profile/instrprof-darwin-dead-strip.c

Removed: 
    


################################################################################
diff  --git a/compiler-rt/test/profile/instrprof-darwin-dead-strip.c b/compiler-rt/test/profile/instrprof-darwin-dead-strip.c
index 6a2bffc213a36..62f66605da280 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


        


More information about the llvm-commits mailing list