1; RUN: llvm-pdbdump pretty -symbols %p/../Inputs/symbolformat.pdb | FileCheck --check-prefix=SYM_FORMAT %s
2; RUN: llvm-pdbdump pretty -types %p/../Inputs/symbolformat.pdb > %t.types
3; RUN: FileCheck --check-prefix=TYPES_FORMAT %s < %t.types
4; RUN: FileCheck --check-prefix=TYPES_1 %s < %t.types
5; RUN: FileCheck --check-prefix=TYPES_2 %s < %t.types
6; RUN: llvm-pdbdump pretty -types %p/../Inputs/symbolformat.pdb | FileCheck --check-prefix=TYPES_FORMAT %s
7; RUN: llvm-pdbdump pretty -globals %p/../Inputs/symbolformat.pdb | FileCheck --check-prefix=GLOBALS %s
8
9; The format is func [0x<rva_start>+<prologue_length> - 0x<rva_end>-<epilogue_length>]
10; SYM_FORMAT: ---SYMBOLS---
11; SYM_FORMAT: symbolformat-fpo.obj
12; SYM_FORMAT-DAG: func [{{.*}}] (FPO) unsigned int __cdecl fpo_func(unsigned int n)
13; SYM_FORMAT: symbolformat.obj
14; SYM_FORMAT-DAG: func [{{.*}}] (EBP) int __cdecl _purecall()
15; SYM_FORMAT-DAG: func [{{.*}}] (EBP) int __cdecl main(int argc, char** argv)
16; SYM_FORMAT-DAG: func [{{.*}}] (EBP) void A::A()
17; SYM_FORMAT-DAG: func [{{.*}}] (EBP) void B::B()
18; SYM_FORMAT-DAG: thunk [{{.*}}] (Pcode) B::`vcall'{0}'
19; SYM_FORMAT-DAG: func [{{.*}}] (EBP) virtual void B::PureFunc()
20; SYM_FORMAT-DAG: func [{{.*}}] (EBP) void A::RegularFunc()
21; SYM_FORMAT-DAG: func [{{.*}}] (EBP) virtual void A::VirtualFunc()
22
23; TYPES_FORMAT: ---TYPES---
24; TYPES_FORMAT: Enums
25; TYPES_FORMAT-DAG: enum TestEnum
26; TYPES_FORMAT-DAG: enum TestEnumClass
27; TYPES_FORMAT: Typedefs
28; TYPES_FORMAT-DAG: typedef int IntType
29; TYPES_FORMAT-DAG: typedef class A ClassAType
30
31; TYPES_1: Classes
32; TYPES_1: struct A {
33; TYPES_1: public:
34; TYPES_1: virtual void PureFunc() = 0
35; TYPES_1: virtual void VirtualFunc()
36; TYPES_1: void RegularFunc()
37; TYPES_1: }
38
39; TYPES_2: Classes
40; TYPES_2: struct MemberTest {
41; TYPES_2: data +0x00 MemberTest::NestedEnum m_nested_enum
42; TYPES_2: data +0x04 int m_typedef
43; TYPES_2: data +0x08 bool m_bool
44; TYPES_2: data +0x09 char m_char
45; TYPES_2: data +0x0a wchar_t m_wchar_t
46; TYPES_2: data +0x0c int m_int
47; TYPES_2: data +0x10 unsigned int m_unsigned
48; TYPES_2: data +0x14 long m_long
49; TYPES_2: data +0x18 unsigned long m_unsigned_long
50; TYPES_2: data +0x20 __int64 m_int64
51; TYPES_2: data +0x28 unsigned __int64 m_unsigned_int64
52; TYPES_2: data +0x30 float m_float
53; TYPES_2: data +0x38 double m_double
54; TYPES_2: data +0x40 void (__cdecl *m_pfn_2_args)(int, double)
55; TYPES_2: }
56
57; GLOBALS: ---GLOBALS---
58; GLOBALS-DAG: func [{{.*}}] (FPO) unsigned int __cdecl fpo_func(unsigned int n)
59; GLOBALS-DAG: data [{{.*}}] static void* g_global_pointer
60; GLOBALS-DAG: data [{{.*}}] static int g_global_int
61