Skip to content

Commit f4abf28

Browse files
committed
[lldb] Update the PDB tests to pass with the VS2019 toolset
The pdb lldb tests do not work correctly with both the VS2019 and VS2017 toolsets at the moment. This change updates several of the tests to work with both toolsets. Unfortunately, this makes the tests suboptimal for both toolsets, but we can update them to be better for VS2019 once we officially drop VS2017. This change is meant to bridge the gap until the update happens, so that the buildbots can work with either toolset. Differential Revision: https://reviews.llvm.org/D115482
1 parent 1a60ae0 commit f4abf28

File tree

5 files changed

+10
-11
lines changed

5 files changed

+10
-11
lines changed

lldb/test/Shell/SymbolFile/PDB/ast-restore.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ CLASS-DAG: static const N0::N1::(anonymous namespace)::Enum ClassSta
5656
CLASS-DAG: static const N0::N1::(anonymous namespace)::ScopedEnum ClassStaticConstScopedEnum = 4;
5757
CLASS-DAG: N0::N1::Class::Inner m_inner;
5858
CLASS-DAG: {{(inline )?}}Class(N0::N1::(anonymous namespace)::Enum);
59-
CLASS-DAG: static {{(inline )?}}int StaticFunc(const N0::N1::Class &);
59+
CLASS-DAG: {{(static )?}}{{(inline )?}}int StaticFunc(const N0::N1::Class &);
6060
CLASS-DAG: {{(inline )?}}int PrivateFunc(const N0::N1::Class::Inner &);
6161
CLASS: };
6262
CLASS: }

lldb/test/Shell/SymbolFile/PDB/class-layout.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ CLASS: int m_protected;
8585
CLASS: Class();
8686
CLASS: Class(int);
8787
CLASS: ~Class();
88-
CLASS: static int {{.*}}StaticMemberFunc(int, ...);
88+
CLASS: {{(static )?}}int {{.*}}StaticMemberFunc(int, ...);
8989
CLASS: int Get();
9090
CLASS: int f(MemberTest::Friend);
9191
CLASS: bool operator==(const MemberTest::Class &)

lldb/test/Shell/SymbolFile/PDB/enums-layout.test

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,35 +10,35 @@ RUN: lldb-test symbols %T/SimpleTypesTest.cpp.enums.exe | FileCheck --check-pref
1010
; FIXME: PDB does not have information about scoped enumeration (Enum class) so the
1111
; compiler type used is the same as the one for unscoped enumeration.
1212

13-
ENUM: Type{{.*}} , name = "Enum", size = 4, decl = simpletypestest.cpp:19, compiler_type = {{.*}} enum Enum {
13+
ENUM: Type{{.*}} , name = "Enum", size = 4, decl = {{[Ss]}}imple{{[Tt]}}ypes{{[Tt]}}est.cpp:19, compiler_type = {{.*}} enum Enum {
1414
ENUM_NEXT: RED,
1515
ENUM_NEXT: GREEN,
1616
ENUM_NEXT: BLUE
1717
ENUM_NEXT:}
1818

19-
ENUM_CONST: Type{{.*}} , name = "EnumConst", size = 4, decl = simpletypestest.cpp:22, compiler_type = {{.*}} enum EnumConst {
19+
ENUM_CONST: Type{{.*}} , name = "EnumConst", size = 4, decl = {{[Ss]}}imple{{[Tt]}}ypes{{[Tt]}}est.cpp:22, compiler_type = {{.*}} enum EnumConst {
2020
ENUM_CONST-NEXT: LOW,
2121
ENUM_CONST-NEXT: NORMAL,
2222
ENUM_CONST-NEXT: HIGH
2323
ENUM_CONST-NEXT:}
2424

25-
ENUM_EMPTY: Type{{.*}} , name = "EnumEmpty", size = 4, decl = simpletypestest.cpp:25, compiler_type = {{.*}} enum EnumEmpty {
25+
ENUM_EMPTY: Type{{.*}} , name = "EnumEmpty", size = 4, decl = {{[Ss]}}imple{{[Tt]}}ypes{{[Tt]}}est.cpp:25, compiler_type = {{.*}} enum EnumEmpty {
2626
ENUM_EMPTY-NEXT:}
2727

28-
ENUM_UCHAR: Type{{.*}} , name = "EnumUChar", size = 1, decl = simpletypestest.cpp:28, compiler_type = {{.*}} enum EnumUChar {
28+
ENUM_UCHAR: Type{{.*}} , name = "EnumUChar", size = 1, decl = {{[Ss]}}imple{{[Tt]}}ypes{{[Tt]}}est.cpp:28, compiler_type = {{.*}} enum EnumUChar {
2929
ENUM_UCHAR-NEXT: ON,
3030
ENUM_UCHAR-NEXT: OFF,
3131
ENUM_UCHAR-NEXT: AUTO
3232
ENUM_UCHAR-NEXT:}
3333

3434
; Note that `enum EnumClass` is tested instead of `enum class EnumClass`
35-
ENUM_CLASS: Type{{.*}} , name = "EnumClass", size = 4, decl = simpletypestest.cpp:32, compiler_type = {{.*}} enum EnumClass {
35+
ENUM_CLASS: Type{{.*}} , name = "EnumClass", size = 4, decl = {{[Ss]}}imple{{[Tt]}}ypes{{[Tt]}}est.cpp:32, compiler_type = {{.*}} enum EnumClass {
3636
ENUM_CLASS-NEXT: YES,
3737
ENUM_CLASS-NEXT: NO,
3838
ENUM_CLASS-NEXT: DEFAULT
3939
ENUM_CLASS-NEXT:}
4040

41-
ENUM_STRUCT: Type{{.*}} , name = "EnumStruct", size = 4, decl = simpletypestest.cpp:35, compiler_type = {{.*}} enum EnumStruct {
41+
ENUM_STRUCT: Type{{.*}} , name = "EnumStruct", size = 4, decl = {{[Ss]}}imple{{[Tt]}}ypes{{[Tt]}}est.cpp:35, compiler_type = {{.*}} enum EnumStruct {
4242
ENUM_STRUCT-NEXT: red,
4343
ENUM_STRUCT-NEXT: blue,
4444
ENUM_STRUCT-NEXT: black

lldb/test/Shell/SymbolFile/PDB/typedefs.test

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ CHECK-DAG: name = "char32_t", size = 4, compiler_type = {{.*}} char32_t
1717
CHECK-DAG: name = "char16_t", size = 2, compiler_type = {{.*}} char16_t
1818
CHECK-DAG: Type{{.*}} , name = "unsigned long", size = 4, compiler_type = {{.*}} unsigned long
1919
CHECK-DAG: Type{{.*}} , size = 40, compiler_type = {{.*}} unsigned long[10]
20-
CHECK-DAG: Type{{.*}} , name = "ULongArrayTypedef", compiler_type = {{.*}} typedef ULongArrayTypedef
2120

2221
; Note: compiler_type of `long double` is represented by the one for `double`
2322
CHECK-DAG: Type{{.*}} , name = "double", size = 8, compiler_type = {{.*}} double

lldb/test/Shell/SymbolFile/PDB/variables.test

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,15 +51,15 @@ FUNC-MAIN-SAME: scope = local
5151
FUNC-MAIN-NEXT: Variable{{.*}}, name = "a"
5252
FUNC-MAIN-SAME: scope = local
5353

54-
FUNC-CONSTRUCTOR: Function{{.*}}, mangled = ??0Class@@QEAA@H@Z
54+
FUNC-CONSTRUCTOR: Function{{.*}}, {{(de)?}}mangled = {{.*}}{{(Class::)?}}Class{{.*}}
5555
FUNC-CONSTRUCTOR-NEXT: Block
5656
FUNC-CONSTRUCTOR-NEXT: Variable{{.*}}, name = "this"
5757
FUNC-CONSTRUCTOR-SAME: scope = parameter
5858
FUNC-CONSTRUCTOR-SAME: artificial
5959
FUNC-CONSTRUCTOR-NEXT: Variable{{.*}}, name = "a"
6060
FUNC-CONSTRUCTOR-SAME: scope = parameter
6161

62-
FUNC-MEMBER: Function{{.*}}, mangled = ?Func@Class@@QEAAXXZ
62+
FUNC-MEMBER: Function{{.*}}, {{(de)?}}mangled = {{.*}}{{(Class::)?}}Func{{.*}}
6363
FUNC-MEMBER-NEXT: Block
6464
FUNC-MEMBER-NEXT: Variable{{.*}}, name = "this"
6565
FUNC-MEMBER-SAME: scope = parameter

0 commit comments

Comments
 (0)