Add back parsing of header charactestics.

It had been dropped during the switch to yaml::IO. Also add a test going
from yaml2obj to llvm-readobj. It can be extended as we add more
fields/formats to yaml2obj.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178786 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola
2013-04-04 20:30:52 +00:00
parent e50faa754b
commit 5152e4fb06
3 changed files with 43 additions and 1 deletions
+1
View File
@@ -1,5 +1,6 @@
header: !Header
Machine: IMAGE_FILE_MACHINE_I386 # (0x14c)
Characteristics: [ IMAGE_FILE_DEBUG_STRIPPED ]
sections:
- !Section
+5
View File
@@ -0,0 +1,5 @@
RUN: yaml2obj %p/Inputs/COFF/i386.yaml | llvm-readobj -file-headers - | FileCheck %s --check-prefix COFF-I386
// COFF-I386: Characteristics [ (0x200)
// COFF-I386-NEXT: IMAGE_FILE_DEBUG_STRIPPED (0x200)
// COFF-I386-NEXT: ]