diff options
| author | Zachary Turner <zturner@google.com> | 2018-10-01 17:55:38 +0000 |
|---|---|---|
| committer | Zachary Turner <zturner@google.com> | 2018-10-01 17:55:38 +0000 |
| commit | a5e3e02602a350b1cd704bda39194e140e4a0cc6 (patch) | |
| tree | 983c1ee5f1914eef9248e33818c994e00880a1b4 /llvm/test | |
| parent | 5c1873b21351779f51857991320657f7eb0dc7b2 (diff) | |
| download | bcm5719-llvm-a5e3e02602a350b1cd704bda39194e140e4a0cc6.tar.gz bcm5719-llvm-a5e3e02602a350b1cd704bda39194e140e4a0cc6.zip | |
[PDB] Add support for dumping Typedef records.
These work a little differently because they are actually in
the globals stream and are treated as symbol records, even though
DIA presents them as types. So this also adds the necessary
infrastructure to cache records that live somewhere other than
the TPI stream as well.
llvm-svn: 343507
Diffstat (limited to 'llvm/test')
| -rw-r--r-- | llvm/test/DebugInfo/PDB/Native/pdb-native-typedefs.test | 33 | ||||
| -rw-r--r-- | llvm/test/tools/llvm-pdbdump/type-qualifiers.test | 2 |
2 files changed, 34 insertions, 1 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: } diff --git a/llvm/test/tools/llvm-pdbdump/type-qualifiers.test b/llvm/test/tools/llvm-pdbdump/type-qualifiers.test index ff68e2ff95c..0969c15873c 100644 --- a/llvm/test/tools/llvm-pdbdump/type-qualifiers.test +++ b/llvm/test/tools/llvm-pdbdump/type-qualifiers.test @@ -16,7 +16,7 @@ ; GLOBALS_DATA-DAG: static volatile int* __restrict NS::p_data_member ; QUALS: ---TYPES--- -; QUALS-DAG: typedef RankNArray +; QUALS-DAG: typedef volatile int*[100][10] RankNArray ; QUALS-DAG: typedef long* __restrict RestrictTypedef ; QUALS: union Union ; QUALS-DAG: int* __restrict x_member |

