summaryrefslogtreecommitdiffstats
path: root/llvm/test/DebugInfo/PDB
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test/DebugInfo/PDB')
-rw-r--r--llvm/test/DebugInfo/PDB/Native/pdb-native-typedefs.test33
1 files changed, 33 insertions, 0 deletions
diff --git a/llvm/test/DebugInfo/PDB/Native/pdb-native-typedefs.test b/llvm/test/DebugInfo/PDB/Native/pdb-native-typedefs.test
new file mode 100644
index 00000000000..5784fcc37f0
--- /dev/null
+++ b/llvm/test/DebugInfo/PDB/Native/pdb-native-typedefs.test
@@ -0,0 +1,33 @@
+; Test that the native PDB reader can enumerate typedefs. The output being
+; checked against is golden output generated by llvm-pdbutil without the
+; -native flag. Then we check that we generate the same output.
+
+; RUN: llvm-pdbutil pretty -native -typedefs %p/../Inputs/symbolformat.pdb \
+; RUN: | FileCheck -check-prefix=PRETTY %s
+
+; RUN: llvm-pdbutil diadump -native -typedefs %p/../Inputs/symbolformat.pdb \
+; RUN: | FileCheck -check-prefix=DUMP %s
+
+PRETTY: Typedefs: (3 items)
+PRETTY-NEXT: typedef int IntType
+PRETTY-NEXT: typedef class A ClassAType
+PRETTY-NEXT: typedef int[3] int_array
+
+DUMP: {
+DUMP-NEXT: symIndexId: 2
+DUMP-NEXT: symTag: Typedef
+DUMP-NEXT: name: IntType
+DUMP-NEXT: typeId: 3
+DUMP-NEXT: }
+DUMP-NEXT: {
+DUMP-NEXT: symIndexId: 4
+DUMP-NEXT: symTag: Typedef
+DUMP-NEXT: name: ClassAType
+DUMP-NEXT: typeId: 5
+DUMP-NEXT: }
+DUMP-NEXT: {
+DUMP-NEXT: symIndexId: 6
+DUMP-NEXT: symTag: Typedef
+DUMP-NEXT: name: int_array
+DUMP-NEXT: typeId: 7
+DUMP-NEXT: }
OpenPOWER on IntegriCloud