1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-26 04:32:44 +01:00
llvm-mirror/test/ObjectYAML/MachO/bogus_load_command.yaml
Georgii Rymar de7d2c4397 [ObjectYAML] - Redefine LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::yaml::Hex*) as LLVM_YAML_IS_FLOW_SEQUENCE_VECTOR.
I am using it in https://reviews.llvm.org/D69399.

This change changes how obj2yaml dumps arrays of `llvm::yaml::Hex8/llvm::yaml::Hex16/llvm::yaml::Hex32`
from:

```
PayloadBytes:
- 0x01
- 0x02
...
```

To

```
PayloadBytes:    [ 0x01, 0x02, ... ]
```

The latter way is shorter and looks better for arrays.

Differential revision: https://reviews.llvm.org/D69558
2019-10-30 18:12:48 +03:00

42 lines
987 B
YAML

# RUN: yaml2obj %s | obj2yaml | FileCheck %s
--- !mach-o
FileHeader:
magic: 0xFEEDFACF
cputype: 0x01000007
cpusubtype: 0x80000003
filetype: 0x00000002
ncmds: 2
sizeofcmds: 56
flags: 0x00218085
reserved: 0x00000000
LoadCommands:
- cmd: 0xDEADBEEF
cmdsize: 32
ZeroPadBytes: 24
- cmd: 0xDEADBEEF
cmdsize: 24
PayloadBytes:
- 0x01
- 0x02
- 0x03
- 0x04
- 0x05
- 0x06
- 0x07
- 0x08
- 0x09
- 0x0A
- 0x0B
- 0x0C
...
#CHECK: - cmd: 0xDEADBEEF
#CHECK: cmdsize: 32
#CHECK: ZeroPadBytes:
#CHECK: - cmd: 0xDEADBEEF
#CHECK: cmdsize: 24
#CHECK: PayloadBytes: [ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
#CHECK: 0x09, 0x0A, 0x0B, 0x0C, 0x00, 0x00, 0x00, 0x00 ]
#CHECK-NOT: LinkEditData: