summaryrefslogtreecommitdiffstats
path: root/llvm/test/DebugInfo/PDB/Inputs
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2015-02-20 23:05:57 +0000
committerZachary Turner <zturner@google.com>2015-02-20 23:05:57 +0000
commitd1b1136e0e84bdeac1981bf9b52f300f7743f8ab (patch)
tree2f2c60d4c79307ec2670e547c6a4c087d5e2c7ea /llvm/test/DebugInfo/PDB/Inputs
parent2da9cd26d679180fa6c730e185ff2808be353bb4 (diff)
downloadbcm5719-llvm-d1b1136e0e84bdeac1981bf9b52f300f7743f8ab.tar.gz
bcm5719-llvm-d1b1136e0e84bdeac1981bf9b52f300f7743f8ab.zip
[llvm-pdbdump] Add some tests for llvm-pdbdump.
This adds only a very basic set of tests that dump a few functions and object files. Differential Revision: http://reviews.llvm.org/D7656 Reviewed By: David Blaikie llvm-svn: 230083
Diffstat (limited to 'llvm/test/DebugInfo/PDB/Inputs')
-rw-r--r--llvm/test/DebugInfo/PDB/Inputs/empty.cpp7
-rw-r--r--llvm/test/DebugInfo/PDB/Inputs/empty.pdbbin0 -> 102400 bytes
-rw-r--r--llvm/test/DebugInfo/PDB/Inputs/symbolformat-fpo.cpp6
-rw-r--r--llvm/test/DebugInfo/PDB/Inputs/symbolformat.cpp24
-rw-r--r--llvm/test/DebugInfo/PDB/Inputs/symbolformat.pdbbin0 -> 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..f27ea18832e
--- /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
new file mode 100644
index 00000000000..ae65c3a885c
--- /dev/null
+++ b/llvm/test/DebugInfo/PDB/Inputs/empty.pdb
Binary files differ
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..3a7200809d1
--- /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..86135a4c285
--- /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
new file mode 100644
index 00000000000..3bbc7bb1389
--- /dev/null
+++ b/llvm/test/DebugInfo/PDB/Inputs/symbolformat.pdb
Binary files differ
OpenPOWER on IntegriCloud