diff --git a/test/vast/Conversion/cmake-platform-test.c b/test/vast/Conversion/cmake-platform-test.c index 725f2c8a74..b6f842f261 100644 --- a/test/vast/Conversion/cmake-platform-test.c +++ b/test/vast/Conversion/cmake-platform-test.c @@ -24,7 +24,7 @@ #define SIZE (sizeof(unsigned short)) -// CHECK: constant @info_size() {{.*}} !llvm.array +// CHECK: @info_size() {{.*}} !llvm.array static char info_size[] = {'I', 'N', 'F', 'O', ':', 's','i','z','e','[', ('0' + ((SIZE / 10000)%10)), ('0' + ((SIZE / 1000)%10)), diff --git a/test/vast/Conversion/subscript-b.c b/test/vast/Conversion/subscript-b.c index 0b7a178c18..afe4f97fc4 100644 --- a/test/vast/Conversion/subscript-b.c +++ b/test/vast/Conversion/subscript-b.c @@ -2,14 +2,14 @@ // RUN: %check-lower-value-categories %s | %file-check %s -check-prefix=VAL_CAT // RUN: %check-core-to-llvm %s | %file-check %s -check-prefix=C_LLVM -// STD_TYPES: hl.var @arr1 : !hl.lvalue> = { +// STD_TYPES: hl.var @arr1, : !hl.lvalue> = { -// VAL_CAT: hl.var @arr1 : !hl.ptr> = { +// VAL_CAT: hl.var @arr1, : !hl.ptr> = { // VAL_CAT: hl.value.yield {{.*}} : !hl.array<3, si32> -// C_LLVM: llvm.mlir.global internal constant @arr1() {addr_space = 0 : i32} : !llvm.array<3 x i32> { +// C_LLVM: llvm.mlir.global external @arr1() {addr_space = 0 : i32} : !llvm.array<3 x i32> { int arr1[] = { 0, 2, 4 }; diff --git a/test/vast/Dialect/HighLevel/array-a.c b/test/vast/Dialect/HighLevel/array-a.c index 9d2e8ff4ec..8fcbda626f 100644 --- a/test/vast/Dialect/HighLevel/array-a.c +++ b/test/vast/Dialect/HighLevel/array-a.c @@ -1,26 +1,26 @@ // RUN: %vast-cc1 -vast-emit-mlir=hl %s -o - | %file-check %s // RUN: %vast-cc1 -vast-emit-mlir=hl %s -o %t && %vast-opt %t | diff -B %t - -// CHECK: hl.var @ai : !hl.lvalue> +// CHECK: hl.var @ai, : !hl.lvalue> int ai[10]; -// CHECK: hl.var @aci : !hl.lvalue>> +// CHECK: hl.var @aci, : !hl.lvalue>> const int aci[5]; -// CHECK: hl.var @avi : !hl.lvalue>> +// CHECK: hl.var @avi, : !hl.lvalue>> volatile int avi[5]; -// CHECK: hl.var @acvi : !hl.lvalue>> +// CHECK: hl.var @acvi, : !hl.lvalue>> const volatile int acvi[5]; -// CHECK: hl.var @acvui : !hl.lvalue>> +// CHECK: hl.var @acvui, : !hl.lvalue>> const volatile unsigned int acvui[5]; -// CHECK: hl.var @af : !hl.lvalue> +// CHECK: hl.var @af, : !hl.lvalue> float af[10]; -// CHECK: hl.var @a3d : !hl.lvalue>>> +// CHECK: hl.var @a3d, : !hl.lvalue>>> float a3d[2][4][3]; -// CHECK: hl.var @ae : !hl.lvalue> +// CHECK: hl.var @ae, : !hl.lvalue> int ae[4 + 4*100]; diff --git a/test/vast/Dialect/HighLevel/array-b.c b/test/vast/Dialect/HighLevel/array-b.c index a300065146..df906864f1 100644 --- a/test/vast/Dialect/HighLevel/array-b.c +++ b/test/vast/Dialect/HighLevel/array-b.c @@ -1,5 +1,5 @@ // RUN: %vast-cc1 -vast-emit-mlir=hl %s -o - | %file-check %s // RUN: %vast-cc1 -vast-emit-mlir=hl %s -o %t && %vast-opt %t | diff -B %t - -// CHECK: hl.var @earr sc_extern : !hl.lvalue> +// CHECK: hl.var @earr, sc_extern : !hl.lvalue> extern int earr[]; diff --git a/test/vast/Dialect/HighLevel/array-c.c b/test/vast/Dialect/HighLevel/array-c.c index c15f2c30cc..007fcd5de8 100644 --- a/test/vast/Dialect/HighLevel/array-c.c +++ b/test/vast/Dialect/HighLevel/array-c.c @@ -1,7 +1,7 @@ // RUN: %vast-cc1 -vast-emit-mlir=hl %s -o - | %file-check %s // RUN: %vast-cc1 -vast-emit-mlir=hl %s -o %t && %vast-opt %t | diff -B %t - -// CHECK: hl.var @cai : !hl.lvalue>> = { +// CHECK: hl.var @cai, : !hl.lvalue>> = { // CHECK: [[V1:%[0-9]+]] = hl.const #core.integer<1> : !hl.int // CHECK: [[V2:%[0-9]+]] = hl.const #core.integer<2> : !hl.int // CHECK: [[V3:%[0-9]+]] = hl.const #core.integer<3> : !hl.int diff --git a/test/vast/Dialect/HighLevel/cast-b.c b/test/vast/Dialect/HighLevel/cast-b.c index a24cc6e8db..e413cae7d2 100644 --- a/test/vast/Dialect/HighLevel/cast-b.c +++ b/test/vast/Dialect/HighLevel/cast-b.c @@ -4,7 +4,7 @@ // CHECK: hl.typedef @function_type : !core.fn<(!hl.lvalue, !hl.lvalue) -> (!hl.int)> typedef int function_type(int a, int b); -// CHECK: hl.var @p : !hl.lvalue>>>> +// CHECK: hl.var @p, : !hl.lvalue>>>> function_type *p[2]; int test_func(void) { diff --git a/test/vast/Dialect/HighLevel/constants-a.c b/test/vast/Dialect/HighLevel/constants-a.c index 8be57d4f08..74fe28b43f 100644 --- a/test/vast/Dialect/HighLevel/constants-a.c +++ b/test/vast/Dialect/HighLevel/constants-a.c @@ -1,31 +1,31 @@ // RUN: %vast-cc1 -vast-emit-mlir=hl %s -o - | %file-check %s // RUN: %vast-cc1 -vast-emit-mlir=hl %s -o %t && %vast-opt %t | diff -B %t - -// CHECK: hl.var @i : !hl.lvalue +// CHECK: hl.var @i, : !hl.lvalue // CHECK: hl.const #core.integer<0> : !hl.int int i = 0; -// CHECK: hl.var @ui : !hl.lvalue> +// CHECK: hl.var @ui, : !hl.lvalue> // CHECK: hl.const #core.integer<0> : !hl.int< unsigned > unsigned int ui = 0u; -// CHECK: hl.var @lli : !hl.lvalue +// CHECK: hl.var @lli, : !hl.lvalue // CHECK: hl.const #core.integer<0> : !hl.longlong long long int lli = 0ll; -// CHECK: hl.var @f : !hl.lvalue +// CHECK: hl.var @f, : !hl.lvalue // CHECK: hl.const #core.float<0.000000e+00> : !hl.float float f = 0.f; -// CHECK: hl.var @d : !hl.lvalue +// CHECK: hl.var @d, : !hl.lvalue // CHECK: hl.const #core.float<0.000000e+00> : !hl.double double d = 0.0; -// CHECK: hl.var @str : !hl.lvalue>> +// CHECK: hl.var @str, : !hl.lvalue>> // CHECK: hl.const "hello" : !hl.lvalue> const char *str = "hello"; -// CHECK: hl.var @arr : !hl.lvalue>> +// CHECK: hl.var @arr, : !hl.lvalue>> // CHECK: hl.const #core.integer<1> : !hl.int // CHECK: hl.const #core.integer<2> : !hl.int // CHECK: hl.const #core.integer<3> : !hl.int diff --git a/test/vast/Dialect/HighLevel/enum-a.c b/test/vast/Dialect/HighLevel/enum-a.c index fd23e41ca9..774f28f0d0 100644 --- a/test/vast/Dialect/HighLevel/enum-a.c +++ b/test/vast/Dialect/HighLevel/enum-a.c @@ -8,7 +8,7 @@ // CHECK: } enum color { RED, GREEN, BLUE }; -// CHECK: hl.var @c : !hl.lvalue>> +// CHECK: hl.var @c, : !hl.lvalue>> // CHECK: [[V1:%[0-9]+]] = hl.enumref @GREEN : !hl.int // CHECK: [[V2:%[0-9]+]] = hl.implicit_cast [[V1]] IntegralCast : !hl.int -> !hl.elaborated> // CHECK: hl.value.yield [[V2]] : !hl.elaborated> @@ -17,5 +17,5 @@ enum color c = GREEN; // CHECK: hl.typedef @color : !hl.elaborated> typedef enum color color; -// CHECK: hl.var @tc : !hl.lvalue>> +// CHECK: hl.var @tc, : !hl.lvalue>> color tc; diff --git a/test/vast/Dialect/HighLevel/enum-d.c b/test/vast/Dialect/HighLevel/enum-d.c index 8c705092ec..40508024f0 100644 --- a/test/vast/Dialect/HighLevel/enum-d.c +++ b/test/vast/Dialect/HighLevel/enum-d.c @@ -3,12 +3,12 @@ // CHECK: hl.enum @color : !hl.int< unsigned > enum color { RED, GREEN, BLUE }; -// CHECK: hl.var @r : !hl.lvalue>> +// CHECK: hl.var @r, : !hl.lvalue>> // CHECK: hl.enumref @RED : !hl.int enum color r = RED; // CHECK: hl.typedef @color_t : !hl.elaborated> -// CHECK: hl.var @x : !hl.lvalue>> +// CHECK: hl.var @x, : !hl.lvalue>> // CHECK: hl.enumref @GREEN : !hl.int typedef enum color color_t; color_t x = GREEN; diff --git a/test/vast/Dialect/HighLevel/enum-e.c b/test/vast/Dialect/HighLevel/enum-e.c index b72b87aa2e..6c34c8e9dc 100644 --- a/test/vast/Dialect/HighLevel/enum-e.c +++ b/test/vast/Dialect/HighLevel/enum-e.c @@ -13,7 +13,7 @@ struct Element { int z; enum State { SOLID, LIQUID, GAS, PLASMA } state; -// CHECK: hl.var @oxygen : !hl.lvalue>> +// CHECK: hl.var @oxygen, : !hl.lvalue>> // CHECK: [[V1:%[0-9]+]] = hl.const #core.integer<8> : !hl.int // CHECK: [[V2:%[0-9]+]] = hl.enumref @GAS : !hl.int // CHECK: [[V3:%[0-9]+]] = hl.implicit_cast [[V2]] IntegralCast : !hl.int -> !hl.elaborated> diff --git a/test/vast/Dialect/HighLevel/floats-a.c b/test/vast/Dialect/HighLevel/floats-a.c index 7de4014886..c9076b07c9 100644 --- a/test/vast/Dialect/HighLevel/floats-a.c +++ b/test/vast/Dialect/HighLevel/floats-a.c @@ -1,17 +1,17 @@ // RUN: %vast-cc1 -vast-emit-mlir=hl %s -o - | %file-check %s // RUN: %vast-cc1 -vast-emit-mlir=hl %s -o %t && %vast-opt %t | diff -B %t - -// CHECK: hl.var @fp16 : !hl.lvalue +// CHECK: hl.var @fp16, : !hl.lvalue __fp16 fp16 = 0.5; -// CHECK: hl.var @f : !hl.lvalue +// CHECK: hl.var @f, : !hl.lvalue // CHECK: hl.const #core.float<5.000000e-01> : !hl.float float f = 0.5f; -// CHECK: hl.var @d : !hl.lvalue +// CHECK: hl.var @d, : !hl.lvalue // CHECK: hl.const #core.float<5.000000e-01> : !hl.double double d = 0.5; -// CHECK: hl.var @ld : !hl.lvalue +// CHECK: hl.var @ld, : !hl.lvalue // CHECK: hl.const #core.float<5.000000e-01> : !hl.longdouble long double ld = 0.5L; diff --git a/test/vast/Dialect/HighLevel/glob-a.c b/test/vast/Dialect/HighLevel/glob-a.c index 6e5cb03b6d..4f95267777 100644 --- a/test/vast/Dialect/HighLevel/glob-a.c +++ b/test/vast/Dialect/HighLevel/glob-a.c @@ -1,7 +1,7 @@ // RUN: %vast-cc1 -vast-emit-mlir=hl %s -o - | %file-check %s // RUN: %vast-cc1 -vast-emit-mlir=hl %s -o %t && %vast-opt %t | diff -B %t - -// CHECK: hl.var @a : !hl.lvalue +// CHECK: hl.var @a, : !hl.lvalue int a = 0; // CHECK-LABEL: hl.func @main diff --git a/test/vast/Dialect/HighLevel/glob-front-d.c b/test/vast/Dialect/HighLevel/glob-front-d.c index 4ac41aaacb..649c7564b2 100644 --- a/test/vast/Dialect/HighLevel/glob-front-d.c +++ b/test/vast/Dialect/HighLevel/glob-front-d.c @@ -1,6 +1,6 @@ // RUN: %vast-front %s -vast-emit-mlir=hl -o - | %file-check %s -// CHECK: hl.var @a sc_static +// CHECK: hl.var @a, sc_static static int a = 2; int main() { diff --git a/test/vast/Dialect/HighLevel/indirect-call-a.c b/test/vast/Dialect/HighLevel/indirect-call-a.c index 13f721a78d..cb71b3412d 100644 --- a/test/vast/Dialect/HighLevel/indirect-call-a.c +++ b/test/vast/Dialect/HighLevel/indirect-call-a.c @@ -3,7 +3,7 @@ // CHECK: hl.typedef @ck_rv_t : !hl.long< unsigned > typedef unsigned long ck_rv_t; -// CHECK: hl.var @global_lock sc_static : !hl.lvalue> +// CHECK: hl.var @global_lock, sc_static : !hl.lvalue> static void *global_lock = 0; // CHECK: hl.typedef @ck_createmutex_t : !hl.ptr>>) -> (!hl.elaborated>)>>> @@ -33,7 +33,7 @@ struct ck_c_initialize_args // CHECK: hl.typedef @CK_C_INITIALIZE_ARGS_PTR : !hl.ptr>> typedef struct ck_c_initialize_args *CK_C_INITIALIZE_ARGS_PTR; -// CHECK: hl.var @global_locking sc_static : !hl.lvalue>> +// CHECK: hl.var @global_locking, sc_static : !hl.lvalue>> static CK_C_INITIALIZE_ARGS_PTR global_locking; // CHECK: hl.func @sc_pkcs11_lock {{.*}} () -> !hl.long diff --git a/test/vast/Dialect/HighLevel/literals-a.c b/test/vast/Dialect/HighLevel/literals-a.c index 06bd07f427..6712dcbce6 100644 --- a/test/vast/Dialect/HighLevel/literals-a.c +++ b/test/vast/Dialect/HighLevel/literals-a.c @@ -1,37 +1,37 @@ // // RUN: %vast-cc1 -vast-emit-mlir=hl %s -o - | %file-check %s // // RUN: %vast-cc1 -vast-emit-mlir=hl %s -o %t && %vast-opt %t | diff -B %t - -// CHECK: hl.var @li : !hl.lvalue> +// CHECK: hl.var @li, : !hl.lvalue> // CHECK: hl.const #core.integer<10> : !hl.int const int li = 10; -// CHECK: hl.var @lui : !hl.lvalue> +// CHECK: hl.var @lui, : !hl.lvalue> // CHECK: hl.const #core.integer<10> : !hl.int< unsigned > const unsigned int lui = 10u; -// CHECK: hl.var @ll : !hl.lvalue> +// CHECK: hl.var @ll, : !hl.lvalue> // CHECK: hl.const #core.integer<10> : !hl.long const long ll = 10l; -// CHECK: hl.var @lf : !hl.lvalue> +// CHECK: hl.var @lf, : !hl.lvalue> // CHECK: hl.const #core.float<5.000000e-01> : !hl.float const float lf = 0.5f; -// CHECK: hl.var @ld : !hl.lvalue> +// CHECK: hl.var @ld, : !hl.lvalue> // CHECK: hl.const #core.float<5.000000e-01> : !hl.double const double ld = 0.5; -// CHECK: hl.var @lc : !hl.lvalue> +// CHECK: hl.var @lc, : !hl.lvalue> // CHECK: hl.const #core.integer<97> : !hl.int // CHECK: IntegralCast : !hl.int -> !hl.char const char lc = 'a'; -// CHECK: hl.var @null : !hl.lvalue>> +// CHECK: hl.var @null, : !hl.lvalue>> // CHECK: hl.const #core.integer<0> : !hl.int // CHECK: NullToPointer : !hl.int -> !hl.ptr> const void *null = 0; -// CHECK: hl.var @lb : !hl.lvalue> +// CHECK: hl.var @lb, : !hl.lvalue> // CHECK: hl.const #core.integer<1> : !hl.int // CHECK: IntegralToBoolean : !hl.int -> !hl.bool const _Bool lb = 1; @@ -39,17 +39,17 @@ const _Bool lb = 1; #define SCHAR_MIN (-128) #define SCHAR_MAX 127 -// CHECK: hl.var @scmin : !hl.lvalue> +// CHECK: hl.var @scmin, : !hl.lvalue> // CHECK: hl.const #core.integer<128> : !hl.int // CHECK: hl.minus const char scmin = SCHAR_MIN; -// CHECK: hl.var @scmax : !hl.lvalue> +// CHECK: hl.var @scmax, : !hl.lvalue> // CHECK: hl.const #core.integer<127> : !hl.int const char scmax = SCHAR_MAX; #define UCHAR_MAX 255 -// CHECK: hl.var @ucmax : !hl.lvalue> +// CHECK: hl.var @ucmax, : !hl.lvalue> // CHECK: hl.const #core.integer<255> : !hl.int const unsigned char ucmax = UCHAR_MAX; diff --git a/test/vast/Dialect/HighLevel/pointers-a.c b/test/vast/Dialect/HighLevel/pointers-a.c index 9f8f6fe3d4..92763e699a 100644 --- a/test/vast/Dialect/HighLevel/pointers-a.c +++ b/test/vast/Dialect/HighLevel/pointers-a.c @@ -1,47 +1,47 @@ // RUN: %vast-cc1 -vast-emit-mlir=hl %s -o - | %file-check %s // RUN: %vast-cc1 -vast-emit-mlir=hl %s -o %t && %vast-opt %t | diff -B %t - -// CHECK: hl.var @vp : !hl.lvalue> +// CHECK: hl.var @vp, : !hl.lvalue> void * vp = 0; -// CHECK: hl.var @vpp : !hl.lvalue>> +// CHECK: hl.var @vpp, : !hl.lvalue>> void ** vpp = 0; -// CHECK: hl.var @ip : !hl.lvalue> +// CHECK: hl.var @ip, : !hl.lvalue> int * ip = 0; -// CHECK: hl.var @icp : !hl.lvalue>> +// CHECK: hl.var @icp, : !hl.lvalue>> int const * icp = 0; -// CHECK: hl.var @cip : !hl.lvalue>> +// CHECK: hl.var @cip, : !hl.lvalue>> const int * cip = 0; -// CHECK: hl.var @ipc : !hl.lvalue> +// CHECK: hl.var @ipc, : !hl.lvalue> int * const ipc = 0; -// CHECK: hl.var @icpc : !hl.lvalue, const >> +// CHECK: hl.var @icpc, : !hl.lvalue, const >> int const * const icpc = 0; -// CHECK: hl.var @cipc : !hl.lvalue, const >> +// CHECK: hl.var @cipc, : !hl.lvalue, const >> const int * const cipc = 0; -// CHECK: hl.var @ipp : !hl.lvalue>> +// CHECK: hl.var @ipp, : !hl.lvalue>> int ** ipp = 0; -// CHECK: hl.var @ippc : !hl.lvalue, const >> +// CHECK: hl.var @ippc, : !hl.lvalue, const >> int ** const ippc = 0; -// CHECK: hl.var @ipcp : !hl.lvalue>> +// CHECK: hl.var @ipcp, : !hl.lvalue>> int * const * ipcp = 0; -// CHECK: hl.var @icpp : !hl.lvalue>>> +// CHECK: hl.var @icpp, : !hl.lvalue>>> int const ** icpp = 0; -// CHECK: hl.var @ipcpc : !hl.lvalue, const >> +// CHECK: hl.var @ipcpc, : !hl.lvalue, const >> int * const * const ipcpc = 0; -// CHECK: hl.var @ippp : !hl.lvalue>>> +// CHECK: hl.var @ippp, : !hl.lvalue>>> int *** ippp = 0; -// CHECK: hl.var @uip : !hl.lvalue>> +// CHECK: hl.var @uip, : !hl.lvalue>> unsigned int *uip = 0; diff --git a/test/vast/Dialect/HighLevel/pointers-b.c b/test/vast/Dialect/HighLevel/pointers-b.c index 3d026216c4..724b3f3c2a 100644 --- a/test/vast/Dialect/HighLevel/pointers-b.c +++ b/test/vast/Dialect/HighLevel/pointers-b.c @@ -1,33 +1,33 @@ // RUN: %vast-cc1 -vast-emit-mlir=hl %s -o - | %file-check %s // RUN: %vast-cc1 -vast-emit-mlir=hl %s -o %t && %vast-opt %t | diff -B %t - -// CHECK: hl.var @p : !hl.lvalue> -// CHECK: hl.var @pp : !hl.lvalue>> +// CHECK: hl.var @p, : !hl.lvalue> +// CHECK: hl.var @pp, : !hl.lvalue>> float *p, **pp; // p is a pointer to float // pp is a pointer to a pointer to float -// CHECK: hl.var @fp : !hl.lvalue) -> (!hl.int)>>>> +// CHECK: hl.var @fp, : !hl.lvalue) -> (!hl.int)>>>> int (*fp)(int); // fp is a pointer to function with type int(int) -// CHECK: hl.var @pc : !hl.lvalue>> +// CHECK: hl.var @pc, : !hl.lvalue>> int n; const int * pc = &n; // pc is a non-const pointer to a const int -// CHECK: hl.var @cp : !hl.lvalue> +// CHECK: hl.var @cp, : !hl.lvalue> int * const cp = &n; // cp is a const pointer to a non-const int -// CHECK: hl.var @pcp : !hl.lvalue>> +// CHECK: hl.var @pcp, : !hl.lvalue>> int * const * pcp = &cp; // non-const pointer to const pointer to non-const int -// CHECK: hl.var @np : !hl.lvalue> +// CHECK: hl.var @np, : !hl.lvalue> int *np = &n; // pointer to int -// CHECK: hl.var @npp : !hl.lvalue>> +// CHECK: hl.var @npp, : !hl.lvalue>> int *const *npp = &np; // non-const pointer to const pointer to non-const int int a[2]; -// CHECK: hl.var @ap : !hl.lvalue>>> +// CHECK: hl.var @ap, : !hl.lvalue>>> int (*ap)[2] = &a; // pointer to array of int struct S { int n; } s = {1}; -// CHECK: hl.var @sp : !hl.lvalue> +// CHECK: hl.var @sp, : !hl.lvalue> int* sp = &s.n; // pointer to the int that is a member of s diff --git a/test/vast/Dialect/HighLevel/pointers-c.c b/test/vast/Dialect/HighLevel/pointers-c.c index 3abf01435f..736e9dc552 100644 --- a/test/vast/Dialect/HighLevel/pointers-c.c +++ b/test/vast/Dialect/HighLevel/pointers-c.c @@ -1,12 +1,12 @@ // RUN: %vast-cc1 -vast-emit-mlir=hl %s -o - | %file-check %s // RUN: %vast-cc1 -vast-emit-mlir=hl %s -o %t && %vast-opt %t | diff -B %t - -// CHECK: hl.var @p : !hl.lvalue> +// CHECK: hl.var @p, : !hl.lvalue> // CHECK: ArrayToPointerDecay : !hl.lvalue> -> !hl.ptr int a[2]; int *p = a; // pointer to a[0] -// CHECK: hl.var @row : !hl.lvalue>>> +// CHECK: hl.var @row, : !hl.lvalue>>> // CHECK: ArrayToPointerDecay : !hl.lvalue>> -> !hl.ptr> int b[3][3]; int (*row)[3] = b; // pointer to b[0] diff --git a/test/vast/Dialect/HighLevel/pointers-d.c b/test/vast/Dialect/HighLevel/pointers-d.c index 81ece79dfb..062b9825ed 100644 --- a/test/vast/Dialect/HighLevel/pointers-d.c +++ b/test/vast/Dialect/HighLevel/pointers-d.c @@ -2,11 +2,11 @@ // RUN: %vast-cc1 -vast-emit-mlir=hl %s -o %t && %vast-opt %t | diff -B %t - void f(int); -// CHECK: hl.var @pf1 : !hl.lvalue) -> (!hl.void)>>>> +// CHECK: hl.var @pf1, : !hl.lvalue) -> (!hl.void)>>>> // CHECK: [[R:%[0-9]+]] = hl.funcref @f : !core.fn<(!hl.lvalue) -> (!hl.void)> // CHECK: hl.addressof [[R]] : !core.fn<(!hl.lvalue) -> (!hl.void)> -> !hl.ptr) -> (!hl.void)>> void (*pf1)(int) = &f; -// CHECK: hl.var @pf2 : !hl.lvalue) -> (!hl.void)>>>> +// CHECK: hl.var @pf2, : !hl.lvalue) -> (!hl.void)>>>> // CHECK: [[R:%[0-9]+]] = hl.funcref @f : !core.fn<(!hl.lvalue) -> (!hl.void)> // CHECK: hl.implicit_cast [[R]] FunctionToPointerDecay : !core.fn<(!hl.lvalue) -> (!hl.void)> -> !hl.ptr) -> (!hl.void)>> void (*pf2)(int) = f; // same as &f diff --git a/test/vast/Dialect/HighLevel/qualifiers-c.cpp b/test/vast/Dialect/HighLevel/qualifiers-c.cpp index 81a53d598a..4791b3be2d 100644 --- a/test/vast/Dialect/HighLevel/qualifiers-c.cpp +++ b/test/vast/Dialect/HighLevel/qualifiers-c.cpp @@ -1,50 +1,50 @@ // RUN: %vast-cc1 -vast-emit-mlir=hl %s -o - | %file-check %s // RUN: %vast-cc1 -vast-emit-mlir=hl %s -o %t && %vast-opt %t | diff -B %t - -// CHECK: hl.var @p : !hl.lvalue> +// CHECK: hl.var @p, : !hl.lvalue> void *p; -// CHECK: hl.var @i : !hl.lvalue> +// CHECK: hl.var @i, : !hl.lvalue> int *i; -// CHECK: hl.var @u : !hl.lvalue>> +// CHECK: hl.var @u, : !hl.lvalue>> unsigned *u; -// CHECK: hl.var @s : !hl.lvalue> +// CHECK: hl.var @s, : !hl.lvalue> signed *s; -// CHECK: hl.var @ui : !hl.lvalue>> +// CHECK: hl.var @ui, : !hl.lvalue>> unsigned int *ui; -// CHECK: hl.var @us : !hl.lvalue>> +// CHECK: hl.var @us, : !hl.lvalue>> unsigned short *us; -// CHECK: hl.var @ci : !hl.lvalue>> +// CHECK: hl.var @ci, : !hl.lvalue>> const int *ci = 0; -// CHECK: hl.var @cui : !hl.lvalue>> +// CHECK: hl.var @cui, : !hl.lvalue>> const unsigned *cui = 0; -// CHECK: hl.var @vi : !hl.lvalue>> +// CHECK: hl.var @vi, : !hl.lvalue>> volatile int *vi; -// CHECK: hl.var @vui : !hl.lvalue>> +// CHECK: hl.var @vui, : !hl.lvalue>> volatile unsigned *vui; -// CHECK: hl.var @cvi : !hl.lvalue>> +// CHECK: hl.var @cvi, : !hl.lvalue>> const volatile int *cvi = 0; -// CHECK: hl.var @cvui : !hl.lvalue>> +// CHECK: hl.var @cvui, : !hl.lvalue>> const volatile unsigned int *cvui = 0U; -// CHECK: hl.var @b : !hl.lvalue> +// CHECK: hl.var @b, : !hl.lvalue> bool *b; -// CHECK: hl.var @vb : !hl.lvalue>> +// CHECK: hl.var @vb, : !hl.lvalue>> volatile bool *vb; -// CHECK: hl.var @cb : !hl.lvalue>> +// CHECK: hl.var @cb, : !hl.lvalue>> const bool *cb = 0; -// CHECK: hl.var @cvb : !hl.lvalue>> +// CHECK: hl.var @cvb, : !hl.lvalue>> const volatile bool *cvb = 0; diff --git a/test/vast/Dialect/HighLevel/qualifiers-e.c b/test/vast/Dialect/HighLevel/qualifiers-e.c index 9a54f36a9c..86cf638cf3 100644 --- a/test/vast/Dialect/HighLevel/qualifiers-e.c +++ b/test/vast/Dialect/HighLevel/qualifiers-e.c @@ -1,14 +1,14 @@ // RUN: %vast-cc1 -vast-emit-mlir=hl %s -o - | %file-check %s // RUN: %vast-cc1 -vast-emit-mlir=hl %s -o %t && %vast-opt %t | diff -B %t - -// CHECK: hl.var @ia : !hl.lvalue> +// CHECK: hl.var @ia, : !hl.lvalue> int ia[10]; -// CHECK: hl.var @cia : !hl.lvalue>> +// CHECK: hl.var @cia, : !hl.lvalue>> const int cia[10]; -// CHECK: hl.var @via : !hl.lvalue>> +// CHECK: hl.var @via, : !hl.lvalue>> volatile int via[10]; -// CHECK: hl.var @cvia : !hl.lvalue>> +// CHECK: hl.var @cvia, : !hl.lvalue>> const volatile int cvia[10]; diff --git a/test/vast/Dialect/HighLevel/qualifiers-g.c b/test/vast/Dialect/HighLevel/qualifiers-g.c index 19e9b2fb6c..1abc45a971 100644 --- a/test/vast/Dialect/HighLevel/qualifiers-g.c +++ b/test/vast/Dialect/HighLevel/qualifiers-g.c @@ -1,8 +1,8 @@ // RUN: %vast-cc1 -vast-emit-mlir=hl %s -o - | %file-check %s // RUN: %vast-cc1 -vast-emit-mlir=hl %s -o %t && %vast-opt %t | diff -B %t - -// CHECK: hl.var @a : !hl.lvalue> -// CHECK: hl.var @b : !hl.lvalue> +// CHECK: hl.var @a, : !hl.lvalue> +// CHECK: hl.var @b, : !hl.lvalue> float * restrict a, * restrict b; // CHECK: @f {{.*}} (!hl.lvalue, !hl.lvalue>, !hl.lvalue>) diff --git a/test/vast/Dialect/HighLevel/qualifiers-h.c b/test/vast/Dialect/HighLevel/qualifiers-h.c index 283f017e66..35adb44739 100644 --- a/test/vast/Dialect/HighLevel/qualifiers-h.c +++ b/test/vast/Dialect/HighLevel/qualifiers-h.c @@ -4,26 +4,26 @@ // CHECK: hl.enum @e : !hl.int< unsigned > enum e { a, b, c }; -// CHECK: hl.var @v : !hl.lvalue>> +// CHECK: hl.var @v, : !hl.lvalue>> enum e v; -// CHECK: hl.var @cv : !hl.lvalue, const >> +// CHECK: hl.var @cv, : !hl.lvalue, const >> const enum e cv; -// CHECK: hl.var @cvv : !hl.lvalue, const, volatile >> +// CHECK: hl.var @cvv, : !hl.lvalue, const, volatile >> const volatile enum e cvv; // CHECK: hl.typedef @def : !hl.elaborated> typedef enum e def; -// CHECK: hl.var @d : !hl.lvalue>> +// CHECK: hl.var @d, : !hl.lvalue>> def d; -// CHECK: hl.var @cd : !hl.lvalue, const >> +// CHECK: hl.var @cd, : !hl.lvalue, const >> const def cd; -// CHECK: hl.var @vd : !hl.lvalue, volatile >> +// CHECK: hl.var @vd, : !hl.lvalue, volatile >> volatile def vd; -// CHECK: hl.var @cvd : !hl.lvalue, const, volatile >> +// CHECK: hl.var @cvd, : !hl.lvalue, const, volatile >> const volatile def cvd; diff --git a/test/vast/Dialect/HighLevel/qualifiers-i.c b/test/vast/Dialect/HighLevel/qualifiers-i.c index b40c0248e4..93f5c437df 100644 --- a/test/vast/Dialect/HighLevel/qualifiers-i.c +++ b/test/vast/Dialect/HighLevel/qualifiers-i.c @@ -4,26 +4,26 @@ // CHECK: hl.union @u union u { int i; double d; }; -// CHECK: hl.var @v : !hl.lvalue>> +// CHECK: hl.var @v, : !hl.lvalue>> union u v; -// CHECK: hl.var @cv : !hl.lvalue, const >> +// CHECK: hl.var @cv, : !hl.lvalue, const >> const union u cv; -// CHECK: hl.var @cvv : !hl.lvalue, const, volatile >> +// CHECK: hl.var @cvv, : !hl.lvalue, const, volatile >> const volatile union u cvv; // CHECK: hl.typedef @e : !hl.elaborated> typedef union u e; -// CHECK: hl.var @v : !hl.lvalue>> +// CHECK: hl.var @v, : !hl.lvalue>> e v; -// CHECK: hl.var @cv : !hl.lvalue, const >> +// CHECK: hl.var @cv, : !hl.lvalue, const >> const e cv; -// CHECK: hl.var @vv : !hl.lvalue, volatile >> +// CHECK: hl.var @vv, : !hl.lvalue, volatile >> volatile e vv; -// CHECK: hl.var @cvv : !hl.lvalue, const, volatile >> +// CHECK: hl.var @cvv, : !hl.lvalue, const, volatile >> const volatile e cvv; diff --git a/test/vast/Dialect/HighLevel/qualifiers-j.c b/test/vast/Dialect/HighLevel/qualifiers-j.c index 3374566e38..2fed1f8368 100644 --- a/test/vast/Dialect/HighLevel/qualifiers-j.c +++ b/test/vast/Dialect/HighLevel/qualifiers-j.c @@ -1,11 +1,11 @@ // RUN: %vast-cc1 -vast-emit-mlir=hl %s -o - | %file-check %s // RUN: %vast-cc1 -vast-emit-mlir=hl %s -o %t && %vast-opt %t | diff -B %t - -// CHECK: hl.var @fp : !hl.lvalue) -> (!hl.int)>>>> +// CHECK: hl.var @fp, : !hl.lvalue) -> (!hl.int)>>>> int (*fp) (int); -// CHECK: hl.var @cfp : !hl.lvalue) -> (!hl.int< const >)>>>> +// CHECK: hl.var @cfp, : !hl.lvalue) -> (!hl.int< const >)>>>> const int (*cfp)(int); -// CHECK: hl.var @fpc : !hl.lvalue>) -> (!hl.int)>>>> +// CHECK: hl.var @fpc, : !hl.lvalue>) -> (!hl.int)>>>> int (*fpc)(const int); diff --git a/test/vast/Dialect/HighLevel/quirks-i.c b/test/vast/Dialect/HighLevel/quirks-i.c index 9afc2d3df9..69402f3ac2 100644 --- a/test/vast/Dialect/HighLevel/quirks-i.c +++ b/test/vast/Dialect/HighLevel/quirks-i.c @@ -18,7 +18,7 @@ struct lots_of_inits { int w[3]; }; -// CHECK: hl.var @init : !hl.lvalue>> +// CHECK: hl.var @init, : !hl.lvalue>> struct lots_of_inits init = { // CHECK: [[A:%[0-9]+]] = hl.const #core.integer<1> : !hl.int // CHECK: [[B:%[0-9]+]] = hl.const #core.integer<2> : !hl.int @@ -34,7 +34,7 @@ struct lots_of_inits init = { {{1, 2}, {3, 4}}, {5, 6, 7} }; -// CHECK: hl.var @flat_init : !hl.lvalue>> +// CHECK: hl.var @flat_init, : !hl.lvalue>> struct lots_of_inits flat_init = { // CHECK: [[A:%[0-9]+]] = hl.const #core.integer<1> : !hl.int diff --git a/test/vast/Dialect/HighLevel/quirks-k.c b/test/vast/Dialect/HighLevel/quirks-k.c index 3f8b0e178e..f7885471be 100644 --- a/test/vast/Dialect/HighLevel/quirks-k.c +++ b/test/vast/Dialect/HighLevel/quirks-k.c @@ -3,5 +3,5 @@ // adapted from https://gist.github.com/fay59/5ccbe684e6e56a7df8815c3486568f01 -// CHECK: hl.var @foo sc_extern : !hl.lvalue +// CHECK: hl.var @foo, sc_extern : !hl.lvalue extern void foo; diff --git a/test/vast/Dialect/HighLevel/quirks-n.c b/test/vast/Dialect/HighLevel/quirks-n.c index d67ab60f1a..a541e6a3ab 100644 --- a/test/vast/Dialect/HighLevel/quirks-n.c +++ b/test/vast/Dialect/HighLevel/quirks-n.c @@ -12,9 +12,9 @@ unsigned int typedef u32; // CHECK: hl.typedef @baz : !hl.elaborated, const > struct foo { int bar; } const typedef baz; -// CHECK: hl.var @a : !hl.lvalue>> +// CHECK: hl.var @a, : !hl.lvalue>> s16 a; -// CHECK: hl.var @b : !hl.lvalue>> +// CHECK: hl.var @b, : !hl.lvalue>> u32 b; -// CHECK: hl.var @c : !hl.lvalue>> +// CHECK: hl.var @c, : !hl.lvalue>> baz c; diff --git a/test/vast/Dialect/HighLevel/storage-a.c b/test/vast/Dialect/HighLevel/storage-a.c index 823b7afd95..73775514fa 100644 --- a/test/vast/Dialect/HighLevel/storage-a.c +++ b/test/vast/Dialect/HighLevel/storage-a.c @@ -1,22 +1,22 @@ // RUN: %vast-cc1 -vast-emit-mlir=hl %s -o - | %file-check %s // RUN: %vast-cc1 -vast-emit-mlir=hl %s -o %t && %vast-opt %t | diff -B %t - -// CHECK: hl.var @i : !hl.lvalue +// CHECK: hl.var @i, : !hl.lvalue int i; -// CHECKL: hl.var @ei sc_extern : !hl.lvalue +// CHECKL: hl.var @ei, sc_extern : !hl.lvalue extern int ei; -// CHECK: hl.var @si sc_static : !hl.lvalue +// CHECK: hl.var @si, sc_static : !hl.lvalue static int si = 0; -// CHECK: hl.var @ti tsc_c_thread : !hl.lvalue +// CHECK: hl.var @ti, tsc_c_thread : !hl.lvalue _Thread_local int ti; -// CHECK: hl.var @tei sc_extern tsc_c_thread +// CHECK: hl.var @tei, sc_extern tsc_c_thread _Thread_local extern int tei; -// CHECK: hl.var @sti sc_static tsc_c_thread +// CHECK: hl.var @sti, sc_static tsc_c_thread _Thread_local static int sti = 0; void foo() { diff --git a/test/vast/Dialect/HighLevel/string-a.c b/test/vast/Dialect/HighLevel/string-a.c index bb02d4d048..07c47b8a77 100644 --- a/test/vast/Dialect/HighLevel/string-a.c +++ b/test/vast/Dialect/HighLevel/string-a.c @@ -1,7 +1,7 @@ // RUN: %vast-cc1 -vast-emit-mlir=hl %s -o - | %file-check %s // RUN: %vast-cc1 -vast-emit-mlir=hl %s -o %t && %vast-opt %t | diff -B %t - -// CHECK: hl.var @gstr : !hl.lvalue>> +// CHECK: hl.var @gstr, : !hl.lvalue>> // CHECK: hl.const "global" : !hl.lvalue> // CHECK: ArrayToPointerDecay : !hl.lvalue> -> !hl.ptr const char *gstr = "global"; diff --git a/test/vast/Dialect/HighLevel/string-b.c b/test/vast/Dialect/HighLevel/string-b.c index 40d680aed6..e3aa570e72 100644 --- a/test/vast/Dialect/HighLevel/string-b.c +++ b/test/vast/Dialect/HighLevel/string-b.c @@ -1,7 +1,7 @@ // RUN: %vast-cc1 -vast-emit-mlir=hl %s -o - | %file-check %s // RUN: %vast-cc1 -vast-emit-mlir=hl %s -o %t && %vast-opt %t | diff -B %t - -// CHECK: hl.var @gstr : !hl.lvalue>> +// CHECK: hl.var @gstr, : !hl.lvalue>> // CHECK: hl.const "global\0A" : !hl.lvalue> // CHECK: ArrayToPointerDecay : !hl.lvalue> -> !hl.ptr const char *gstr = "global\n"; diff --git a/test/vast/Dialect/HighLevel/struct-a.c b/test/vast/Dialect/HighLevel/struct-a.c index b576920141..c29051c364 100644 --- a/test/vast/Dialect/HighLevel/struct-a.c +++ b/test/vast/Dialect/HighLevel/struct-a.c @@ -12,7 +12,7 @@ struct pair { int a, b; }; -// CHECK: hl.var @p : !hl.lvalue>> +// CHECK: hl.var @p, : !hl.lvalue>> struct pair p; struct forward; @@ -33,7 +33,7 @@ typedef struct wrap { int v; } wrap_t; -// CHECK: hl.var @w : !hl.lvalue>> +// CHECK: hl.var @w, : !hl.lvalue>> wrap_t w; // CHECK: hl.struct @compound : { diff --git a/test/vast/Dialect/HighLevel/struct-c.c b/test/vast/Dialect/HighLevel/struct-c.c index b66cafd24a..c1f91004b6 100644 --- a/test/vast/Dialect/HighLevel/struct-c.c +++ b/test/vast/Dialect/HighLevel/struct-c.c @@ -4,7 +4,7 @@ // CHECK: hl.struct @"[[N:anonymous\[[0-9]+\]]]" : { // CHECK: hl.field @data : !hl.int // CHECK: } -// CHECK: hl.var @named : !hl.lvalue>> +// CHECK: hl.var @named, : !hl.lvalue>> struct { int data; } named; diff --git a/test/vast/Dialect/HighLevel/struct-f.c b/test/vast/Dialect/HighLevel/struct-f.c index 59706e9f6b..0962f22a12 100644 --- a/test/vast/Dialect/HighLevel/struct-f.c +++ b/test/vast/Dialect/HighLevel/struct-f.c @@ -8,7 +8,7 @@ struct X {}; // CHECK: hl.typedef @X : !hl.elaborated> typedef struct Y {} X; -// CHECK: hl.var @x : !hl.lvalue>> +// CHECK: hl.var @x, : !hl.lvalue>> // TODO: this is elaborated "X" struct X x; diff --git a/test/vast/Dialect/HighLevel/union-a.c b/test/vast/Dialect/HighLevel/union-a.c index bf7453af19..ac50c2ac04 100644 --- a/test/vast/Dialect/HighLevel/union-a.c +++ b/test/vast/Dialect/HighLevel/union-a.c @@ -6,7 +6,7 @@ // CHECK: hl.field @u16 : !hl.array<2, !hl.short< unsigned >> // CHECK: hl.field @u8 : !hl.char< unsigned > // CHECK: } -// CHECK: hl.var @u : !hl.lvalue> +// CHECK: hl.var @u, : !hl.lvalue> union u { unsigned int u32; unsigned short u16[2]; diff --git a/test/vast/Dialect/HighLevel/union-b.c b/test/vast/Dialect/HighLevel/union-b.c index 0936925205..a2376d283f 100644 --- a/test/vast/Dialect/HighLevel/union-b.c +++ b/test/vast/Dialect/HighLevel/union-b.c @@ -19,7 +19,7 @@ struct v { // CHECK: hl.field @"[[N5:anonymous\[[0-9]+\]]]" : !hl.record<@"[[N1]]"> // CHECK: hl.field @m : !hl.int int m; -// CHECK: hl.var @v1 : !hl.lvalue>> +// CHECK: hl.var @v1, : !hl.lvalue>> } v1; int main() { diff --git a/test/vast/Transform/HL/LowerTypedefs/var-a.c b/test/vast/Transform/HL/LowerTypedefs/var-a.c index a6bdab6dd6..3a80c90643 100644 --- a/test/vast/Transform/HL/LowerTypedefs/var-a.c +++ b/test/vast/Transform/HL/LowerTypedefs/var-a.c @@ -2,15 +2,15 @@ typedef int INT; -// CHECK: hl.var @a : !hl.lvalue +// CHECK: hl.var @a, : !hl.lvalue INT a = 0; typedef INT IINT; -// CHECK: hl.var @b : !hl.lvalue +// CHECK: hl.var @b, : !hl.lvalue IINT b = 0; typedef IINT IIINT; -// CHECK: hl.var @c : !hl.lvalue +// CHECK: hl.var @c, : !hl.lvalue IIINT c = 0; diff --git a/test/vast/Transform/HL/LowerTypes/array-a.c b/test/vast/Transform/HL/LowerTypes/array-a.c index 817c986e07..c22e0012bb 100644 --- a/test/vast/Transform/HL/LowerTypes/array-a.c +++ b/test/vast/Transform/HL/LowerTypes/array-a.c @@ -1,22 +1,22 @@ // RUN: %vast-cc1 -vast-emit-mlir=hl %s -o - | %vast-opt --vast-hl-lower-types | %file-check %s -// CHECK: hl.var @ai : !hl.lvalue> +// CHECK: hl.var @ai, : !hl.lvalue> int ai[10]; -// CHECK: hl.var @aci : !hl.lvalue> +// CHECK: hl.var @aci, : !hl.lvalue> const int aci[5]; -// CHECK: hl.var @avi : !hl.lvalue> +// CHECK: hl.var @avi, : !hl.lvalue> volatile int avi[5]; -// CHECK: hl.var @acvi : !hl.lvalue> +// CHECK: hl.var @acvi, : !hl.lvalue> const volatile int acvi[5]; -// CHECK: hl.var @acvui : !hl.lvalue> +// CHECK: hl.var @acvui, : !hl.lvalue> const volatile unsigned int acvui[5]; -// CHECK: hl.var @af : !hl.lvalue> +// CHECK: hl.var @af, : !hl.lvalue> float af[10]; -// CHECK: hl.var @a3d : !hl.lvalue>>> +// CHECK: hl.var @a3d, : !hl.lvalue>>> float a3d[2][4][3]; diff --git a/test/vast/Transform/HL/LowerTypes/array-b.c b/test/vast/Transform/HL/LowerTypes/array-b.c index c10980a013..35b3277d69 100644 --- a/test/vast/Transform/HL/LowerTypes/array-b.c +++ b/test/vast/Transform/HL/LowerTypes/array-b.c @@ -1,4 +1,4 @@ // RUN: %vast-cc1 -vast-emit-mlir=hl %s -o - | %vast-opt --vast-hl-lower-types | %file-check %s -// CHECK: hl.var @a sc_extern : !hl.lvalue> +// CHECK: hl.var @a, sc_extern : !hl.lvalue> extern int a[]; diff --git a/test/vast/Transform/HL/LowerTypes/fn-ptr-a.c b/test/vast/Transform/HL/LowerTypes/fn-ptr-a.c index be75588a2d..97cb06d871 100644 --- a/test/vast/Transform/HL/LowerTypes/fn-ptr-a.c +++ b/test/vast/Transform/HL/LowerTypes/fn-ptr-a.c @@ -10,7 +10,7 @@ void * malloc ( unsigned long __size ); curl_malloc_callback Curl_cmalloc = ( curl_malloc_callback ) malloc ; // LTYPES: hl.typedef @curl_malloc_callback : !hl.ptr) -> (!hl.ptr)>> -// LTYPES: hl.var @Curl_cmalloc : !hl.lvalue>> = { +// LTYPES: hl.var @Curl_cmalloc, : !hl.lvalue>> = { -// LTYPEDEFS: hl.var @Curl_cmalloc sc_extern : !hl.lvalue) -> (!hl.ptr)>>> -// LTYPEDEFS: hl.var @Curl_cmalloc : !hl.lvalue) -> (!hl.ptr)>>> = { +// LTYPEDEFS: hl.var @Curl_cmalloc, sc_extern : !hl.lvalue) -> (!hl.ptr)>>> +// LTYPEDEFS: hl.var @Curl_cmalloc, : !hl.lvalue) -> (!hl.ptr)>>> = {