Files
clang-p2996/llvm/test/tools/llvm-cgdata/convert.test
Kyungwoo Lee 9bb555688c Reland [CGData] llvm-cgdata #89884 (#101461)
Reland [CGData] llvm-cgdata #89884 using `Opt` instead of `cl`
- Action options are required, `--convert`, `--show`, `--merge`. This
was similar to sub-commands previously implemented, but having a prefix
`--`.
- `--format` option is added, which specifies `text` or `binary`.

---------

Co-authored-by: Kyungwoo Lee <kyulee@fb.com>
2024-08-20 07:26:50 -07:00

33 lines
850 B
Plaintext

# Test dump between the binary and text formats.
RUN: split-file %s %t
RUN: llvm-cgdata --convert --format binary %t/dump.cgtext -o %t/dump.cgdata
RUN: llvm-cgdata --convert --format text %t/dump.cgdata -o %t/dump-round.cgtext
RUN: llvm-cgdata -c -f binary %t/dump-round.cgtext -o %t/dump-round.cgdata
RUN: llvm-cgdata -c -f text %t/dump-round.cgtext -o %t/dump-round-round.cgtext
RUN: diff %t/dump.cgdata %t/dump-round.cgdata
RUN: diff %t/dump-round.cgtext %t/dump-round-round.cgtext
;--- dump.cgtext
# Outlined stable hash tree
:outlined_hash_tree
---
0:
Hash: 0x0
Terminals: 0
SuccessorIds: [ 1 ]
1:
Hash: 0x1
Terminals: 0
SuccessorIds: [ 2, 3 ]
2:
Hash: 0x3
Terminals: 5
SuccessorIds: [ ]
3:
Hash: 0x2
Terminals: 4
SuccessorIds: [ ]
...