File tree Expand file tree Collapse file tree 4 files changed +15
-14
lines changed
llvm/test/tools/llvm-cgdata Expand file tree Collapse file tree 4 files changed +15
-14
lines changed Original file line number Diff line number Diff line change @@ -7,14 +7,14 @@ RUN: split-file %s %t
7
7
8
8
# Synthesize raw cgdata without the header (24 byte) from the indexed cgdata.
9
9
RUN: llvm-cgdata dump -binary %t/raw-1.cgtext -o %t/raw-1.cgdata
10
- RUN: od -t x1 -j 24 -An %t/raw-1.cgdata | tr -d '\n' | sed 's/ /\\\\/g' > %t/raw-1-bytes.txt
11
- RUN: sed -i "s/<RAW_1_BYTES>/$(cat %t/raw-1-bytes.txt)/g" %t/merge-1.ll
10
+ RUN: od -t x1 -j 24 -An %t/raw-1.cgdata | tr -d '\n\r\t ' | sed 's/[ ]*$//' | sed 's/[ ][ ]* /\\\\/g' > %t/raw-1-bytes.txt
11
+ RUN: sed -ie "s/<RAW_1_BYTES>/$(cat %t/raw-1-bytes.txt)/g" %t/merge-1.ll
12
12
RUN: llc -filetype=obj -mtriple arm64-apple-darwin %t/merge-1.ll -o %t/merge-1.o
13
13
14
14
# Synthesize raw cgdata without the header (24 byte) from the indexed cgdata.
15
15
RUN: llvm-cgdata dump -binary %t/raw-2.cgtext -o %t/raw-2.cgdata
16
- RUN: od -t x1 -j 24 -An %t/raw-2.cgdata | tr -d '\n' | sed 's/ /\\\\/g' > %t/raw-2-bytes.txt
17
- RUN: sed -i "s/<RAW_2_BYTES>/$(cat %t/raw-2-bytes.txt)/g" %t/merge-2.ll
16
+ RUN: od -t x1 -j 24 -An %t/raw-2.cgdata | tr -d '\n\r\t ' | sed 's/[ ]*$//' | sed 's/[ ][ ]* /\\\\/g' > %t/raw-2-bytes.txt
17
+ RUN: sed -ie "s/<RAW_2_BYTES>/$(cat %t/raw-2-bytes.txt)/g" %t/merge-2.ll
18
18
RUN: llc -filetype=obj -mtriple arm64-apple-darwin %t/merge-2.ll -o %t/merge-2.o
19
19
20
20
# Make an archive from two object files
Original file line number Diff line number Diff line change @@ -8,11 +8,11 @@ RUN: split-file %s %t
8
8
# Synthesize two set of raw cgdata without the header (24 byte) from the indexed cgdata.
9
9
# Concatenate them in merge-concat.ll
10
10
RUN: llvm-cgdata dump -binary %t/raw-1.cgtext -o %t/raw-1.cgdata
11
- RUN: od -t x1 -j 24 -An %t/raw-1.cgdata | tr -d '\n' | sed 's/ /\\\\/g' > %t/raw-1-bytes.txt
12
- RUN: sed -i "s/<RAW_1_BYTES>/$(cat %t/raw-1-bytes.txt)/g" %t/merge-concat.ll
11
+ RUN: od -t x1 -j 24 -An %t/raw-1.cgdata | tr -d '\n\r\t ' | sed 's/[ ]*$//' | sed 's/[ ][ ]* /\\\\/g' > %t/raw-1-bytes.txt
12
+ RUN: sed -ie "s/<RAW_1_BYTES>/$(cat %t/raw-1-bytes.txt)/g" %t/merge-concat.ll
13
13
RUN: llvm-cgdata dump -binary %t/raw-2.cgtext -o %t/raw-2.cgdata
14
- RUN: od -t x1 -j 24 -An %t/raw-2.cgdata | tr -d '\n' | sed 's/ /\\\\/g' > %t/raw-2-bytes.txt
15
- RUN: sed -i "s/<RAW_2_BYTES>/$(cat %t/raw-2-bytes.txt)/g" %t/merge-concat.ll
14
+ RUN: od -t x1 -j 24 -An %t/raw-2.cgdata | tr -d '\n\r\t ' | sed 's/[ ]*$//' | sed 's/[ ][ ]* /\\\\/g' > %t/raw-2-bytes.txt
15
+ RUN: sed -ie "s/<RAW_2_BYTES>/$(cat %t/raw-2-bytes.txt)/g" %t/merge-concat.ll
16
16
17
17
RUN: llc -filetype=obj -mtriple arm64-apple-darwin %t/merge-concat.ll -o %t/merge-concat.o
18
18
RUN: llvm-cgdata merge %t/merge-concat.o -o %t/merge-concat.cgdata
Original file line number Diff line number Diff line change @@ -7,14 +7,14 @@ RUN: split-file %s %t
7
7
8
8
# Synthesize raw cgdata without the header (24 byte) from the indexed cgdata.
9
9
RUN: llvm-cgdata dump -binary %t/raw-1.cgtext -o %t/raw-1.cgdata
10
- RUN: od -t x1 -j 24 -An %t/raw-1.cgdata | tr -d '\n' | sed 's/ /\\\\/g' > %t/raw-1-bytes.txt
11
- RUN: sed -i "s/<RAW_1_BYTES>/$(cat %t/raw-1-bytes.txt)/g" %t/merge-1.ll
10
+ RUN: od -t x1 -j 24 -An %t/raw-1.cgdata | tr -d '\n\r\t ' | sed 's/[ ]*$//' | sed 's/[ ][ ]* /\\\\/g' > %t/raw-1-bytes.txt
11
+ RUN: sed -ie "s/<RAW_1_BYTES>/$(cat %t/raw-1-bytes.txt)/g" %t/merge-1.ll
12
12
RUN: llc -filetype=obj -mtriple arm64-apple-darwin %t/merge-1.ll -o %t/merge-1.o
13
13
14
14
# Synthesize raw cgdata without the header (24 byte) from the indexed cgdata.
15
15
RUN: llvm-cgdata dump -binary %t/raw-2.cgtext -o %t/raw-2.cgdata
16
- RUN: od -t x1 -j 24 -An %t/raw-2.cgdata | tr -d '\n' | sed 's/ /\\\\/g' > %t/raw-2-bytes.txt
17
- RUN: sed -i "s/<RAW_2_BYTES>/$(cat %t/raw-2-bytes.txt)/g" %t/merge-2.ll
16
+ RUN: od -t x1 -j 24 -An %t/raw-2.cgdata | tr -d '\n\r\t ' | sed 's/[ ]*$//' | sed 's/[ ][ ]* /\\\\/g' > %t/raw-2-bytes.txt
17
+ RUN: sed -ie "s/<RAW_2_BYTES>/$(cat %t/raw-2-bytes.txt)/g" %t/merge-2.ll
18
18
RUN: llc -filetype=obj -mtriple arm64-apple-darwin %t/merge-2.ll -o %t/merge-2.o
19
19
20
20
# Merge two object files into the codegen data file.
Original file line number Diff line number Diff line change @@ -13,8 +13,9 @@ RUN: llvm-cgdata show %t/merge-empty.cgdata | count 0
13
13
14
14
# Synthesize raw cgdata without the header (24 byte) from the indexed cgdata.
15
15
RUN: llvm-cgdata dump -binary %t/raw-single.cgtext -o %t/raw-single.cgdata
16
- RUN: od -t x1 -j 24 -An %t/raw-single.cgdata | tr -d '\n' | sed 's/ /\\\\/g' > %t/raw-single-bytes.txt
17
- RUN: sed -i "s/<RAW_1_BYTES>/$(cat %t/raw-single-bytes.txt)/g" %t/merge-single.ll
16
+ RUN: od -t x1 -j 24 -An %t/raw-single.cgdata | tr -d '\n\r\t' | sed 's/[ ]*$//' | sed 's/[ ][ ]*/\\\\/g' > %t/raw-single-bytes.txt
17
+
18
+ RUN: sed -ie "s/<RAW_1_BYTES>/$(cat %t/raw-single-bytes.txt)/g" %t/merge-single.ll
18
19
RUN: llc -filetype=obj -mtriple arm64-apple-darwin %t/merge-single.ll -o %t/merge-single.o
19
20
20
21
# Merge an object file having cgdata (__llvm_outline)
You can’t perform that action at this time.
0 commit comments