File: enums-layout.test

package info (click to toggle)
llvm-toolchain-11 1%3A11.0.1-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 995,808 kB
  • sloc: cpp: 4,767,656; ansic: 760,916; asm: 477,436; python: 170,940; objc: 69,804; lisp: 29,914; sh: 23,855; f90: 18,173; pascal: 7,551; perl: 7,471; ml: 5,603; awk: 3,489; makefile: 2,573; xml: 915; cs: 573; fortran: 503; javascript: 452
file content (45 lines) | stat: -rw-r--r-- 2,218 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
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=ENUM_CONST %s
RUN: lldb-test symbols %T/SimpleTypesTest.cpp.enums.exe | FileCheck --check-prefix=ENUM_EMPTY %s
RUN: lldb-test symbols %T/SimpleTypesTest.cpp.enums.exe | FileCheck --check-prefix=ENUM_UCHAR %s
RUN: lldb-test symbols %T/SimpleTypesTest.cpp.enums.exe | FileCheck --check-prefix=ENUM_CLASS %s
RUN: lldb-test symbols %T/SimpleTypesTest.cpp.enums.exe | FileCheck --check-prefix=ENUM_STRUCT %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 = simpletypestest.cpp:19, compiler_type = {{.*}} enum Enum {
ENUM_NEXT:    RED,
ENUM_NEXT:    GREEN,
ENUM_NEXT:    BLUE
ENUM_NEXT:}

ENUM_CONST:      Type{{.*}} , name = "EnumConst", size = 4,  decl = simpletypestest.cpp:22, compiler_type = {{.*}} enum EnumConst {
ENUM_CONST-NEXT:    LOW,
ENUM_CONST-NEXT:    NORMAL,
ENUM_CONST-NEXT:    HIGH
ENUM_CONST-NEXT:}

ENUM_EMPTY:      Type{{.*}} , name = "EnumEmpty", size = 4,  decl = simpletypestest.cpp:25, compiler_type = {{.*}} enum EnumEmpty {
ENUM_EMPTY-NEXT:}

ENUM_UCHAR:      Type{{.*}} , name = "EnumUChar", size = 1,  decl = simpletypestest.cpp:28, compiler_type = {{.*}} enum EnumUChar {
ENUM_UCHAR-NEXT:    ON,
ENUM_UCHAR-NEXT:    OFF,
ENUM_UCHAR-NEXT:    AUTO
ENUM_UCHAR-NEXT:}

; Note that `enum EnumClass` is tested instead of `enum class EnumClass`
ENUM_CLASS:      Type{{.*}} , name = "EnumClass", size = 4,  decl = simpletypestest.cpp:32, compiler_type = {{.*}} enum EnumClass {
ENUM_CLASS-NEXT:    YES,
ENUM_CLASS-NEXT:    NO,
ENUM_CLASS-NEXT:    DEFAULT
ENUM_CLASS-NEXT:}

ENUM_STRUCT:      Type{{.*}} , name = "EnumStruct", size = 4,  decl = simpletypestest.cpp:35, compiler_type = {{.*}} enum EnumStruct {
ENUM_STRUCT-NEXT:    red,
ENUM_STRUCT-NEXT:    blue,
ENUM_STRUCT-NEXT:    black
ENUM_STRUCT-NEXT:}