REQUIRES: system-windows, msvc
RUN: %build --compiler=msvc --arch=32 --nodefaultlib --output=%T/SimpleTypesTest.cpp.enums.exe %S/Inputs/SimpleTypesTest.cpp
RUN: lldb-test symbols %T/SimpleTypesTest.cpp.enums.exe | FileCheck --check-prefix=ENUM %s
RUN: lldb-test symbols %T/SimpleTypesTest.cpp.enums.exe | FileCheck --check-prefix=CONST-ENUM %s
RUN: lldb-test symbols %T/SimpleTypesTest.cpp.enums.exe | FileCheck --check-prefix=EMPTY-ENUM %s
RUN: lldb-test symbols %T/SimpleTypesTest.cpp.enums.exe | FileCheck --check-prefix=UCHAR-ENUM %s
RUN: lldb-test symbols %T/SimpleTypesTest.cpp.enums.exe | FileCheck --check-prefix=CLASS-ENUM %s
RUN: lldb-test symbols %T/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:}