Files
clang-p2996/llvm/test/tools/llvm-cgdata/show.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

31 lines
646 B
Plaintext

# Test show
RUN: split-file %s %t
RUN: llvm-cgdata --show %t/show.cgtext | FileCheck %s
CHECK: Outlined hash tree:
CHECK-NEXT: Total Node Count: 3
CHECK-NEXT: Terminal Node Count: 1
CHECK-NEXT: Depth: 2
# Convert the text file to the binary file
RUN: llvm-cgdata --convert --format binary %t/show.cgtext -o %t/show.cgdata
RUN: llvm-cgdata --show %t/show.cgdata | FileCheck %s
;--- show.cgtext
:outlined_hash_tree
---
0:
Hash: 0x0
Terminals: 0
SuccessorIds: [ 1 ]
1:
Hash: 0x1
Terminals: 0
SuccessorIds: [ 2 ]
2:
Hash: 0x2
Terminals: 3
SuccessorIds: [ ]
...