1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
## Check that llvm-objcopy reports a suitable error when it
## encounters an invalid input during reading.
## We can't have multiple DXIL parts.
# RUN: yaml2obj %s --docnum=1 -o %t1
# RUN: not llvm-objcopy %t1 %t1.out 2>&1 | FileCheck %s -DFILE=%t1 --check-prefix=ERROR1
# ERROR1: error: '[[FILE]]': More than one DXIL part is present in the file
--- !dxcontainer
Header:
Hash: [ 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0 ]
Version:
Major: 1
Minor: 0
PartCount: 2
Parts:
- Name: DXIL
Size: 28
- Name: DXIL
Size: 28
...
## The first part offset is out of file bounds.
# RUN: yaml2obj %s --docnum=2 -o %t2
# RUN: not llvm-objcopy %t2 %t2.out 2>&1 | FileCheck %s -DFILE=%t2 --check-prefix=ERROR2
# ERROR2: error: '[[FILE]]': Reading structure out of file bounds
--- !dxcontainer
Header:
Hash: [ 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0 ]
Version:
Major: 2
Minor: 0
PartCount: 1
PartOffsets: [ 48 ]
Parts:
- Name: DXIL
Size: 28
...
|