1 ; RUN: llvm-pdbutil pretty -module-syms %p/../Inputs/symbolformat.pdb | FileCheck --check-prefix=SYM_FORMAT_FPO %s
2 ; RUN: llvm-pdbutil pretty -module-syms %p/../Inputs/symbolformat.pdb | FileCheck --check-prefix=SYM_FORMAT %s
3 ; RUN: llvm-pdbutil pretty -classes -enums -typedefs %p/../Inputs/symbolformat.pdb > %t.types
4 ; RUN: FileCheck --check-prefix=TYPES_FORMAT %s < %t.types
5 ; RUN: FileCheck --check-prefix=TYPES_1 %s < %t.types
6 ; RUN: FileCheck --check-prefix=TYPES_2 %s < %t.types
7 ; RUN: llvm-pdbutil pretty -enums -typedefs %p/../Inputs/symbolformat.pdb | FileCheck --check-prefix=TYPES_FORMAT %s
8 ; RUN: llvm-pdbutil pretty -globals %p/../Inputs/symbolformat.pdb | FileCheck --check-prefix=GLOBALS %s
10 ; The format is func [0x<rva_start>+<prologue_length> - 0x<rva_end>-<epilogue_length>]
11 ; SYM_FORMAT_FPO: ---SYMBOLS---
12 ; SYM_FORMAT_FPO: symbolformat-fpo.obj
13 ; SYM_FORMAT-FPO: func [{{.*}}] (FPO) unsigned int __cdecl fpo_func(unsigned int n)
15 ; SYM_FORMAT: ---SYMBOLS---
16 ; SYM_FORMAT: symbolformat.obj
17 ; SYM_FORMAT-DAG: func [{{.*}}] (EBP) int __cdecl _purecall()
18 ; SYM_FORMAT-DAG: func [{{.*}}] (EBP) int __cdecl main(int argc, char** argv)
19 ; SYM_FORMAT-DAG: func [{{.*}}] (EBP) void A::A()
20 ; SYM_FORMAT-DAG: func [{{.*}}] (EBP) void B::B()
21 ; SYM_FORMAT-DAG: thunk [{{.*}}] (Pcode) B::`vcall'{0}'
22 ; SYM_FORMAT-DAG: func [{{.*}}] (EBP) virtual void B::PureFunc()
23 ; SYM_FORMAT-DAG: func [{{.*}}] (EBP) void A::RegularFunc()
24 ; SYM_FORMAT-DAG: func [{{.*}}] (EBP) virtual void A::VirtualFunc()
26 ; TYPES_FORMAT: ---TYPES---
28 ; TYPES_FORMAT-DAG: enum TestEnum
29 ; TYPES_FORMAT-DAG: enum TestEnumClass
30 ; TYPES_FORMAT: Typedefs
31 ; TYPES_FORMAT-DAG: typedef int IntType
32 ; TYPES_FORMAT-DAG: typedef class A ClassAType
35 ; TYPES_1: struct A [sizeof = 4] {
36 ; TYPES_1: virtual void PureFunc() = 0
37 ; TYPES_1: virtual void {{(A::)?}}VirtualFunc()
38 ; TYPES_1: void {{(A::)?}}RegularFunc()
42 ; TYPES_2: struct MemberTest [sizeof = 96] {
43 ; TYPES_2: data +0x00 [sizeof=4] MemberTest::NestedEnum m_nested_enum
44 ; TYPES_2: data +0x04 [sizeof=4] int m_typedef
45 ; TYPES_2: data +0x08 [sizeof=1] bool m_bool
46 ; TYPES_2: data +0x09 [sizeof=1] char m_char
47 ; TYPES_2: data +0x0a [sizeof=2] wchar_t m_wchar_t
48 ; TYPES_2: data +0x0c [sizeof=4] int m_int
49 ; TYPES_2: data +0x10 [sizeof=4] unsigned int m_unsigned
50 ; TYPES_2: data +0x14 [sizeof=4] long m_long
51 ; TYPES_2: data +0x18 [sizeof=4] unsigned long m_unsigned_long
52 ; TYPES_2: <padding> (4 bytes)
53 ; TYPES_2: data +0x20 [sizeof=8] __int64 m_int64
54 ; TYPES_2: data +0x28 [sizeof=8] unsigned __int64 m_unsigned_int64
55 ; TYPES_2: data +0x30 [sizeof=4] float m_float
56 ; TYPES_2: <padding> (4 bytes)
57 ; TYPES_2: data +0x38 [sizeof=8] double m_double
58 ; TYPES_2: data +0x40 [sizeof=4] void (__cdecl * m_pfn_2_args)(int, double)
59 ; TYPES_2: data +0x44 [sizeof=24] int m_multidimensional_array[2][3]
62 ; GLOBALS: ---GLOBALS---
63 ; GLOBALS-DAG: func [{{.*}}] (FPO) unsigned int __cdecl fpo_func(unsigned int n)
64 ; GLOBALS-DAG: data [{{.*}}, sizeof=4] static void* g_global_pointer
65 ; GLOBALS-DAG: data [{{.*}}, sizeof=4] static int g_global_int
66 ; GLOBALS-DAG: data [{{.*}}, sizeof=12] static int g_array[3]
67 ; GLOBALS-DAG: data [{{.*}}, sizeof=4] static int (* g_pointer_to_array)[3]
68 ; GLOBALS-DAG: data [{{.*}}, sizeof=4] static const int* g_pointer_to_const_int
69 ; GLOBALS-DAG: data [sizeof=4] int* const g_const_pointer_to_int = 0
70 ; GLOBALS-DAG: data [sizeof=4] const int* const g_const_pointer_to_const_int = 0