1 // Compile with "cl /c /Zi /GR- symbolformat.cpp"
2 // Compile symbolformat-fpo.cpp (see file for instructions)
3 // Link with "link symbolformat.obj symbolformat-fpo.obj /debug /nodefaultlib
4 // /entry:main /out:symbolformat.exe"
6 int __cdecl _purecall(void) { return 0; }
13 enum class TestEnumClass {
19 virtual void PureFunc() = 0 {}
20 virtual void VirtualFunc() {}
27 struct B : public A, protected virtual VirtualBase {
28 void PureFunc() override {}
37 typedef int NestedTypedef;
39 NestedEnum m_nested_enum;
40 NestedTypedef m_typedef;
47 unsigned long m_unsigned_long;
49 unsigned __int64 m_unsigned_int64;
52 void (*m_pfn_2_args)(int, double);
59 void *g_global_pointer = nullptr;
61 int main(int argc, char **argv) {
62 // Force symbol references so the linker generates debug info
65 auto PureAddr = &B::PureFunc;
66 auto VirtualAddr = &A::PureFunc;
67 auto RegularAddr = &A::RegularFunc;
68 TestEnum Enum = Value;
69 TestEnumClass EnumClass = TestEnumClass::Value10;
71 ClassAType *ClassA = &b;