1- # REQUIRES: shell, aarch64-registered-target
1+ # REQUIRES: aarch64-registered-target
22# UNSUPPORTED: system-windows
33
44# Test merge a single object file having both __llvm_outline and __llvm_merge into a cgdata.
@@ -8,15 +8,19 @@ RUN: split-file %s %t
88
99# Synthesize raw hashtree bytes without the header (32 byte) from the indexed cgdata.
1010RUN: llvm-cgdata --convert --format binary %t/raw-hashtree.cgtext -o %t/raw-hashtree.cgdata
11- RUN: od -t x1 -j 32 -An %t/raw-hashtree.cgdata | tr -d '\n\r\t' | sed 's/[ ]*$//' | sed 's/[ ][ ]*/\\\\/g' > %t/raw-hashtree-bytes.txt
11+ RUN: echo -n "s/<RAW_1_BYTES>/" > %t/raw-hashtree-sed.txt
12+ RUN: od -t x1 -j 32 -An %t/raw-hashtree.cgdata | tr -d '\n\r\t' | sed 's/[ ]*$//' | sed 's/[ ][ ]*/\\\\/g' >> %t/raw-hashtree-sed.txt
13+ RUN: echo "/g" >> %t/raw-hashtree-sed.txt
1214
1315# Synthesize raw funcmap bytes without the header (32 byte) from the indexed cgdata.
1416RUN: llvm-cgdata --convert --format binary %t/raw-funcmap.cgtext -o %t/raw-funcmap.cgdata
15- RUN: od -t x1 -j 32 -An %t/raw-funcmap.cgdata | tr -d '\n\r\t' | sed 's/[ ]*$//' | sed 's/[ ][ ]*/\\\\/g' > %t/raw-funcmap-bytes.txt
17+ RUN: echo -n "s/<RAW_2_BYTES>/" > %t/raw-funcmap-sed.txt
18+ RUN: od -t x1 -j 32 -An %t/raw-funcmap.cgdata | tr -d '\n\r\t' | sed 's/[ ]*$//' | sed 's/[ ][ ]*/\\\\/g' >> %t/raw-funcmap-sed.txt
19+ RUN: echo "/g" >> %t/raw-funcmap-sed.txt
1620
1721# Synthesize a bitcode file by creating two sections for the hash tree and the function map, respectively.
18- RUN: sed "s/<RAW_1_BYTES>/$(cat %t/raw-hashtree-bytes .txt)/g" %t/merge-both-template.ll > %t/merge-both-hashtree-template.ll
19- RUN: sed "s/<RAW_2_BYTES>/$(cat %t/raw-funcmap-bytes .txt)/g" %t/merge-both-hashtree-template.ll > %t/merge-both-hashtree-funcmap.ll
22+ RUN: sed -f %t/raw-hashtree-sed .txt %t/merge-both-template.ll > %t/merge-both-hashtree-template.ll
23+ RUN: sed -f %t/raw-funcmap-sed .txt %t/merge-both-hashtree-template.ll > %t/merge-both-hashtree-funcmap.ll
2024
2125RUN: llc -filetype=obj -mtriple arm64-apple-darwin %t/merge-both-hashtree-funcmap.ll -o %t/merge-both-hashtree-funcmap.o
2226
0 commit comments