%T has been deprecated for about seven years, mostly because it is not unique to each test which can lead to races. This patch updates the few remaining tests in lldb that use %T to not use it (either directly using files or creating their own temp dir). The eventual goal is to remove support for %T from llvm-lit given few tests use it and it still has racey behavior. This patch errors on the side of creating new temp dirs even when not strictly necessary to avoid needing to update filenames inside filecheck matchers.
47 lines
2.3 KiB
Plaintext
47 lines
2.3 KiB
Plaintext
REQUIRES: system-windows, msvc
|
|
RUN: mkdir -p %t.dir
|
|
RUN: %build --compiler=msvc --arch=32 --nodefaultlib --output=%t.dir/SimpleTypesTest.cpp.enums.exe %S/Inputs/SimpleTypesTest.cpp
|
|
RUN: lldb-test symbols %t.dir/SimpleTypesTest.cpp.enums.exe | FileCheck --check-prefix=ENUM %s
|
|
RUN: lldb-test symbols %t.dir/SimpleTypesTest.cpp.enums.exe | FileCheck --check-prefix=CONST-ENUM %s
|
|
RUN: lldb-test symbols %t.dir/SimpleTypesTest.cpp.enums.exe | FileCheck --check-prefix=EMPTY-ENUM %s
|
|
RUN: lldb-test symbols %t.dir/SimpleTypesTest.cpp.enums.exe | FileCheck --check-prefix=UCHAR-ENUM %s
|
|
RUN: lldb-test symbols %t.dir/SimpleTypesTest.cpp.enums.exe | FileCheck --check-prefix=CLASS-ENUM %s
|
|
RUN: lldb-test symbols %t.dir/SimpleTypesTest.cpp.enums.exe | FileCheck --check-prefix=STRUCT-ENUM %s
|
|
|
|
; FIXME: PDB does not have information about scoped enumeration (Enum class) so the
|
|
; compiler type used is the same as the one for unscoped enumeration.
|
|
|
|
ENUM: Type{{.*}} , name = "Enum", size = 4, decl = {{[Ss]}}imple{{[Tt]}}ypes{{[Tt]}}est.cpp:19, compiler_type = {{.*}} enum Enum {
|
|
ENUM-NEXT: RED,
|
|
ENUM-NEXT: GREEN,
|
|
ENUM-NEXT: BLUE
|
|
ENUM-NEXT:}
|
|
|
|
CONST-ENUM: Type{{.*}} , name = "EnumConst", size = 4, decl = {{[Ss]}}imple{{[Tt]}}ypes{{[Tt]}}est.cpp:22, compiler_type = {{.*}} enum EnumConst {
|
|
CONST-ENUM-NEXT: LOW,
|
|
CONST-ENUM-NEXT: NORMAL,
|
|
CONST-ENUM-NEXT: HIGH
|
|
CONST-ENUM-NEXT:}
|
|
|
|
EMPTY-ENUM: Type{{.*}} , name = "EnumEmpty", size = 4, decl = {{[Ss]}}imple{{[Tt]}}ypes{{[Tt]}}est.cpp:25, compiler_type = {{.*}} enum EnumEmpty {
|
|
EMPTY-ENUM-NEXT:}
|
|
|
|
UCHAR-ENUM: Type{{.*}} , name = "EnumUChar", size = 1, decl = {{[Ss]}}imple{{[Tt]}}ypes{{[Tt]}}est.cpp:28, compiler_type = {{.*}} enum EnumUChar {
|
|
UCHAR-ENUM-NEXT: ON,
|
|
UCHAR-ENUM-NEXT: OFF,
|
|
UCHAR-ENUM-NEXT: AUTO
|
|
UCHAR-ENUM-NEXT:}
|
|
|
|
; Note that `enum EnumClass` is tested instead of `enum class EnumClass`
|
|
CLASS-ENUM: Type{{.*}} , name = "EnumClass", size = 4, decl = {{[Ss]}}imple{{[Tt]}}ypes{{[Tt]}}est.cpp:32, compiler_type = {{.*}} enum EnumClass {
|
|
CLASS-ENUM-NEXT: YES,
|
|
CLASS-ENUM-NEXT: NO,
|
|
CLASS-ENUM-NEXT: DEFAULT
|
|
CLASS-ENUM-NEXT:}
|
|
|
|
STRUCT-ENUM: Type{{.*}} , name = "EnumStruct", size = 4, decl = {{[Ss]}}imple{{[Tt]}}ypes{{[Tt]}}est.cpp:35, compiler_type = {{.*}} enum EnumStruct {
|
|
STRUCT-ENUM-NEXT: red,
|
|
STRUCT-ENUM-NEXT: blue,
|
|
STRUCT-ENUM-NEXT: black
|
|
STRUCT-ENUM-NEXT:}
|