1 ## Check how yaml2obj produces PGO Analysis Map in .llvm_bb_addr_map section.
3 # RUN: yaml2obj --docnum=1 %s -o %t1
4 # RUN: llvm-readobj --sections --section-data %t1 | FileCheck %s
6 # Case 4: Specify Entries.
7 # CHECK: Name: .llvm_bb_addr_map (1)
9 # CHECK-NEXT: 0000: 02072000 00000000 0000010B 010203E8
10 # CHECK-NEXT: 0010: 07E80702 0CEEDDBB F70E0D91 A2C48801
13 # Case 7: Not including a field which is enabled in feature doesn't emit value
14 # CHECK: Name: .llvm_bb_addr_map (1)
15 # CHECK: SectionData (
16 # CHECK-NEXT: 0000: 02012000 00000000 0000020D 010203 |
26 ## Test the following cases:
28 ## 1) We can produce an .llvm_bb_addr_map section from a description with
29 ## Entries and PGO Analysis data.
30 - Name: '.llvm_bb_addr_map (1)'
31 Type: SHT_LLVM_BB_ADDR_MAP
36 - BaseAddress: 0x0000000000000020
39 AddressOffset: 0x00000001
43 - FuncEntryCount: 1000
52 ## 2) According to feature we have FuncEntryCount but none is provided in yaml
53 - Name: '.llvm_bb_addr_map (2)'
54 Type: SHT_LLVM_BB_ADDR_MAP
59 - BaseAddress: 0x0000000000000020
63 AddressOffset: 0x00000001
67 ## Check that yaml2obj generates a warning when we use unsupported feature.
68 # RUN: yaml2obj --docnum=2 %s 2>&1 | FileCheck %s --check-prefix=INVALID-FEATURE
69 # INVALID-FEATURE: warning: invalid encoding for BBAddrMap::Features: 0xf0
77 - Name: '.llvm_bb_addr_map'
78 Type: SHT_LLVM_BB_ADDR_MAP
81 ## Specify unsupported feature