Files
llvm-6502/test/DebugInfo/PDB/Inputs/symbolformat.cpp
Zachary Turner 92d755ea65 [llvm-pdbdump] Add an option to dump full class definitions.
This adds the --class-definitions flag.  If specified, when dumping
types, instead of "class Foo" you will see the full class definition,
with member functions, constructors, access specifiers.

NOTE: Using this option can be very slow, as generating a full class
definition requires accessing many different parts of the PDB.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230203 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-23 05:58:34 +00:00

54 lines
1.0 KiB
C++

// Compile with "cl /c /Zi /GR- symbolformat.cpp"
// Compile symbolformat-fpo.cpp (see file for instructions)
// Link with "link symbolformat.obj symbolformat-fpo.obj /debug /nodefaultlib
// /entry:main /out:symbolformat.exe"
int __cdecl _purecall(void) { return 0; }
enum TestEnum {
Value,
Value10 = 10
};
enum class TestEnumClass {
Value,
Value10 = 10
};
struct A {
virtual void PureFunc() = 0 {}
virtual void VirtualFunc() {}
void RegularFunc() {}
};
struct VirtualBase {
};
struct B : public A, protected virtual VirtualBase {
void PureFunc() override {}
enum NestedEnum {
FirstVal,
SecondVal
};
typedef int NestedTypedef;
NestedEnum EnumVar;
NestedTypedef TypedefVar;
};
typedef int IntType;
typedef A ClassAType;
int main(int argc, char **argv) {
B b;
auto PureAddr = &B::PureFunc;
auto VirtualAddr = &A::PureFunc;
auto RegularAddr = &A::RegularFunc;
TestEnum Enum = Value;
TestEnumClass EnumClass = TestEnumClass::Value10;
IntType Int = 12;
ClassAType *ClassA = &b;
return 0;
}