diff options
Diffstat (limited to 'llvm/test/DebugInfo/PDB/Inputs')
-rw-r--r-- | llvm/test/DebugInfo/PDB/Inputs/empty.cpp | 7 | ||||
-rw-r--r-- | llvm/test/DebugInfo/PDB/Inputs/empty.pdb | bin | 0 -> 102400 bytes | |||
-rw-r--r-- | llvm/test/DebugInfo/PDB/Inputs/symbolformat-fpo.cpp | 6 | ||||
-rw-r--r-- | llvm/test/DebugInfo/PDB/Inputs/symbolformat.cpp | 24 | ||||
-rw-r--r-- | llvm/test/DebugInfo/PDB/Inputs/symbolformat.pdb | bin | 0 -> 110592 bytes |
5 files changed, 37 insertions, 0 deletions
diff --git a/llvm/test/DebugInfo/PDB/Inputs/empty.cpp b/llvm/test/DebugInfo/PDB/Inputs/empty.cpp new file mode 100644 index 00000000000..6021aca7bfc --- /dev/null +++ b/llvm/test/DebugInfo/PDB/Inputs/empty.cpp @@ -0,0 +1,7 @@ +// Build with "cl.exe /Zi empty.cpp /link /debug /nodefaultlib /entry:main" + +void *__purecall = 0; + +int main() { + return 42; +} diff --git a/llvm/test/DebugInfo/PDB/Inputs/empty.pdb b/llvm/test/DebugInfo/PDB/Inputs/empty.pdb Binary files differnew file mode 100644 index 00000000000..ae65c3a885c --- /dev/null +++ b/llvm/test/DebugInfo/PDB/Inputs/empty.pdb diff --git a/llvm/test/DebugInfo/PDB/Inputs/symbolformat-fpo.cpp b/llvm/test/DebugInfo/PDB/Inputs/symbolformat-fpo.cpp new file mode 100644 index 00000000000..56a5b26f2ca --- /dev/null +++ b/llvm/test/DebugInfo/PDB/Inputs/symbolformat-fpo.cpp @@ -0,0 +1,6 @@ +// Compile with "cl /GR- /Zi /c /Ox /Oy symbolformat-fpo.cpp" +// Refer to symbolformat.cpp for linking instructions. + +unsigned fpo_func(unsigned n) { + return n * 2; +} diff --git a/llvm/test/DebugInfo/PDB/Inputs/symbolformat.cpp b/llvm/test/DebugInfo/PDB/Inputs/symbolformat.cpp new file mode 100644 index 00000000000..1aa865214fb --- /dev/null +++ b/llvm/test/DebugInfo/PDB/Inputs/symbolformat.cpp @@ -0,0 +1,24 @@ +// 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; } + +struct A { + virtual void PureFunc() = 0 {} + virtual void VirtualFunc() {} + void RegularFunc() {} +}; + +struct B : public A { + void PureFunc() override {} +}; + +int main(int argc, char **argv) { + B b; + auto PureAddr = &B::PureFunc; + auto VirtualAddr = &A::PureFunc; + auto RegularAddr = &A::RegularFunc; + return 0; +} diff --git a/llvm/test/DebugInfo/PDB/Inputs/symbolformat.pdb b/llvm/test/DebugInfo/PDB/Inputs/symbolformat.pdb Binary files differnew file mode 100644 index 00000000000..3bbc7bb1389 --- /dev/null +++ b/llvm/test/DebugInfo/PDB/Inputs/symbolformat.pdb |