Files
clang-p2996/lldb/lit/SymbolFile/PDB/pointers.test
Aleksandr Urakov 7d2a74fc54 [PDB] Parse UDT symbols and pointers to members (combined patch)
Summary:
In this patch I've tried to combine the best ideas from D49368 and D49410,
so it implements following:

- Completion of UDTs from a PDB with a filling of a layout info;
- Pointers to members;
- Fixes the bug relating to a virtual base offset reading from `vbtable`.
  The offset was treated as an unsigned, but it can be a negative sometimes.
- Support of MSInheritance attribute

Reviewers: asmith, zturner, rnk, labath, clayborg, lldb-commits

Reviewed By: zturner

Subscribers: aleksandr.urakov, stella.stamenova, JDevlieghere, lldb-commits

Differential Revision: https://reviews.llvm.org/D49980

llvm-svn: 339649
2018-08-14 07:57:44 +00:00

39 lines
1.8 KiB
Plaintext

REQUIRES: windows
RUN: clang-cl -m32 /Z7 /c /GS- %S/Inputs/PointerTypeTest.cpp /o %T/PointerTypeTest.cpp.obj
RUN: link %T/PointerTypeTest.cpp.obj /DEBUG /nodefaultlib /ENTRY:main /OUT:%T/PointerTypeTest.cpp.exe
RUN: lldb-test symbols %T/PointerTypeTest.cpp.exe | FileCheck %s
RUN: lldb-test symbols %T/PointerTypeTest.cpp.exe | FileCheck --check-prefix=MAIN-ST-F %s
RUN: lldb-test symbols %T/PointerTypeTest.cpp.exe | FileCheck --check-prefix=MAIN-ST %s
RUN: lldb-test symbols %T/PointerTypeTest.cpp.exe | FileCheck --check-prefix=MAIN %s
RUN: lldb-test symbols %T/PointerTypeTest.cpp.exe | FileCheck --check-prefix=F %s
CHECK: Module [[MOD:.*]]
CHECK: {{^[0-9A-F]+}}: CompileUnit{{[{]0x[0-9a-f]+[}]}}, language = "c++", file = '{{.*}}\PointerTypeTest.cpp'
MAIN-ST-F: name = "main::ST::f"
MAIN-ST-F-SAME: decl = PointerTypeTest.cpp:8
MAIN-ST-F-SAME: compiler_type = {{.*}} int (int)
MAIN-ST: name = "main::ST", size = 4, decl = PointerTypeTest.cpp:6, compiler_type = {{.*}} struct main::ST {
MAIN-ST-NEXT: int a;
MAIN-ST-NEXT: int {{.*}}f(int);
MAIN-ST-NEXT:}
MAIN: Function{[[FID1:.*]]}, mangled = _main
MAIN-NEXT: Block{[[FID1]]}
MAIN: Variable{{.*}}, name = "array_pointer"
MAIN-SAME: (int (*)[2][4]), scope = local
MAIN: Variable{{.*}}, name = "p_int"
MAIN-SAME: (int *), scope = local
MAIN: Variable{{.*}}, name = "p_member_field"
MAIN-SAME: (int main::ST::*), scope = local
MAIN: Variable{{.*}}, name = "p_member_method"
MAIN-SAME: (int (main::ST::*)(int)), scope = local
F: Function{[[FID2:.*]]}, demangled = {{.*}}f(int)
F-NEXT: Block{[[FID2]]}
F: Variable{{.*}}, name = "this"
F-SAME: (main::ST *), scope = parameter, location = {{.*}}, artificial
F: Variable{{.*}}, name = "x"
F-SAME: (int), scope = parameter, decl = PointerTypeTest.cpp:8