1## Test that the string table is dumped correctly. 2 3## The string table contains more than one entry. 4# RUN: yaml2obj --docnum=1 %s -o %t1 5# RUN: llvm-readobj --string-table %t1 | FileCheck %s --check-prefix=BASIC 6 7# BASIC: StringTable { 8# BASIC-NEXT: Length: 16 9# BASIC-NEXT: [ 4] name2 10# BASIC-NEXT: [ a] name1 11# BASIC-NEXT: } 12 13--- !XCOFF 14FileHeader: 15 MagicNumber: 0x01F7 16Symbols: 17 - Name: name1 18 - Name: name2 19 20## The string table just contains a single-byte sized string entry. 21# RUN: yaml2obj --docnum=2 %s -o %t2 22# RUN: llvm-readobj --string-table %t2 | FileCheck %s --check-prefix=SINGLE-BYTE 23 24# SINGLE-BYTE: StringTable { 25# SINGLE-BYTE-NEXT: Length: 6 26# SINGLE-BYTE-NEXT: [ 4] n 27# SINGLE-BYTE-NEXT: } 28 29--- !XCOFF 30FileHeader: 31 MagicNumber: 0x01F7 32Symbols: 33 - Name: n 34 35## There is no string table. 36# RUN: yaml2obj --docnum=3 %s -o %t3 37# RUN: llvm-readobj --string-table %t3 | FileCheck %s --check-prefix=NO-STRTBL 38 39# NO-STRTBL: StringTable { 40# NO-STRTBL-NEXT: Length: 0 41# NO-STRTBL-NEXT: } 42 43--- !XCOFF 44FileHeader: 45 MagicNumber: 0x01F7 46