From a54b7ddb25bda65696b7c2af8b5edab6ca85445c Mon Sep 17 00:00:00 2001 From: Zachary Turner Date: Sun, 22 Feb 2015 06:47:32 +0000 Subject: [llvm-pdbdump] Resubmit "Add some tests for llvm-pdbdump". NOTE: This patch intentionally breaks the build. It attempts to resubmit r230083, but with some debug logging in the CMake and lit config files to determine why certain bots do not correctly disable the DIA tests when DIA is not available. After a sufficient number of bots fail, this patch will either be reverted or, if the cause of the failure becomes obvious, a fix submitted with the log statements removed. llvm-svn: 230161 --- llvm/test/DebugInfo/PDB/Inputs/symbolformat.cpp | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 llvm/test/DebugInfo/PDB/Inputs/symbolformat.cpp (limited to 'llvm/test/DebugInfo/PDB/Inputs/symbolformat.cpp') 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; +} -- cgit v1.2.3