1 # REQUIRES: x86-registered-target
2 # RUN: llvm-mc -filetype=obj -triple x86_64-pc-win32 %s -o %t
3 # RUN: not llvm-readobj %t --cg-profile 2>&1 | FileCheck --check-prefix=ERR %s
5 ## In order to use --cg-profile option, the section ".llvm.call-graph-profile"
6 ## should have two 4-byte fields representing the indexes of two symbols and
7 ## one 8-byte fields representing the weight from first symbol to second
9 ## The section in this test case has 9 bytes of data, so it's malformed.
11 # ERR: error: '{{.*}}': Stream Error: The stream is too short to perform the requested operation.
20 .section ".llvm.call-graph-profile"
21 .long 10 ## Symbol index of a.
22 .long 11 ## Symbol index of b.
23 .byte 32 ## Weight from a to b. It is an error, since it should have a length of 8 bytes.