diff --git a/test/vast/Dialect/HighLevel/array-a.c b/test/vast/Dialect/HighLevel/array-a.c index 4aacf327a5..608649cfbd 100644 --- a/test/vast/Dialect/HighLevel/array-a.c +++ b/test/vast/Dialect/HighLevel/array-a.c @@ -4,16 +4,16 @@ // CHECK: hl.var @ai, : !hl.lvalue> int ai[10]; -// CHECK: hl.var @aci, : !hl.lvalue>> +// CHECK: hl.var @aci, constant : !hl.lvalue>> const int aci[5]; // CHECK: hl.var @avi, : !hl.lvalue>> volatile int avi[5]; -// CHECK: hl.var @acvi, : !hl.lvalue>> +// CHECK: hl.var @acvi, constant : !hl.lvalue>> const volatile int acvi[5]; -// CHECK: hl.var @acvui, : !hl.lvalue>> +// CHECK: hl.var @acvui, constant : !hl.lvalue>> const volatile unsigned int acvui[5]; // CHECK: hl.var @af, : !hl.lvalue> diff --git a/test/vast/Dialect/HighLevel/array-c.c b/test/vast/Dialect/HighLevel/array-c.c index 007fcd5de8..545ac9ead3 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, constant : !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/autotype-a.c b/test/vast/Dialect/HighLevel/autotype-a.c index 4f12da12c6..efa75fed32 100644 --- a/test/vast/Dialect/HighLevel/autotype-a.c +++ b/test/vast/Dialect/HighLevel/autotype-a.c @@ -11,7 +11,7 @@ int main() { int x = 0; //CHECK: hl.var @_a : !hl.lvalue> int y = auto_t(x); - //CHECK: hl.var @_a : !hl.lvalue> + //CHECK: hl.var @_a constant : !hl.lvalue> int z = auto_tc(x); //CHECK: hl.var @u : !hl.lvalue> __auto_type u = z; diff --git a/test/vast/Dialect/HighLevel/constants-a.c b/test/vast/Dialect/HighLevel/constants-a.c index 74fe28b43f..f506b6afb4 100644 --- a/test/vast/Dialect/HighLevel/constants-a.c +++ b/test/vast/Dialect/HighLevel/constants-a.c @@ -25,7 +25,7 @@ double d = 0.0; // CHECK: hl.const "hello" : !hl.lvalue> const char *str = "hello"; -// CHECK: hl.var @arr, : !hl.lvalue>> +// CHECK: hl.var @arr, constant : !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/literals-a.c b/test/vast/Dialect/HighLevel/literals-a.c index 6712dcbce6..e594be2c2a 100644 --- a/test/vast/Dialect/HighLevel/literals-a.c +++ b/test/vast/Dialect/HighLevel/literals-a.c @@ -1,27 +1,27 @@ // // 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, constant : !hl.lvalue> // CHECK: hl.const #core.integer<10> : !hl.int const int li = 10; -// CHECK: hl.var @lui, : !hl.lvalue> +// CHECK: hl.var @lui, constant : !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, constant : !hl.lvalue> // CHECK: hl.const #core.integer<10> : !hl.long const long ll = 10l; -// CHECK: hl.var @lf, : !hl.lvalue> +// CHECK: hl.var @lf, constant : !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, constant : !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, constant : !hl.lvalue> // CHECK: hl.const #core.integer<97> : !hl.int // CHECK: IntegralCast : !hl.int -> !hl.char const char lc = 'a'; @@ -31,7 +31,7 @@ const char lc = 'a'; // CHECK: NullToPointer : !hl.int -> !hl.ptr> const void *null = 0; -// CHECK: hl.var @lb, : !hl.lvalue> +// CHECK: hl.var @lb, constant : !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, constant : !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, constant : !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, constant : !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 92763e699a..5c23f57eb5 100644 --- a/test/vast/Dialect/HighLevel/pointers-a.c +++ b/test/vast/Dialect/HighLevel/pointers-a.c @@ -16,19 +16,19 @@ int const * icp = 0; // CHECK: hl.var @cip, : !hl.lvalue>> const int * cip = 0; -// CHECK: hl.var @ipc, : !hl.lvalue> +// CHECK: hl.var @ipc, constant : !hl.lvalue> int * const ipc = 0; -// CHECK: hl.var @icpc, : !hl.lvalue, const >> +// CHECK: hl.var @icpc, constant : !hl.lvalue, const >> int const * const icpc = 0; -// CHECK: hl.var @cipc, : !hl.lvalue, const >> +// CHECK: hl.var @cipc, constant : !hl.lvalue, const >> const int * const cipc = 0; // CHECK: hl.var @ipp, : !hl.lvalue>> int ** ipp = 0; -// CHECK: hl.var @ippc, : !hl.lvalue, const >> +// CHECK: hl.var @ippc, constant : !hl.lvalue, const >> int ** const ippc = 0; // CHECK: hl.var @ipcp, : !hl.lvalue>> @@ -37,7 +37,7 @@ int * const * ipcp = 0; // CHECK: hl.var @icpp, : !hl.lvalue>>> int const ** icpp = 0; -// CHECK: hl.var @ipcpc, : !hl.lvalue, const >> +// CHECK: hl.var @ipcpc, constant : !hl.lvalue, const >> int * const * const ipcpc = 0; // CHECK: hl.var @ippp, : !hl.lvalue>>> diff --git a/test/vast/Dialect/HighLevel/pointers-b.c b/test/vast/Dialect/HighLevel/pointers-b.c index c6ec00838f..de6984e8a8 100644 --- a/test/vast/Dialect/HighLevel/pointers-b.c +++ b/test/vast/Dialect/HighLevel/pointers-b.c @@ -13,7 +13,7 @@ int (*fp)(int); // fp is a pointer to function with type int(int) 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, constant : !hl.lvalue> int * const cp = &n; // cp is a const pointer to a non-const int // CHECK: hl.var @pcp, : !hl.lvalue>> diff --git a/test/vast/Dialect/HighLevel/qualifiers-a.cpp b/test/vast/Dialect/HighLevel/qualifiers-a.cpp index b3249087f8..adab980736 100644 --- a/test/vast/Dialect/HighLevel/qualifiers-a.cpp +++ b/test/vast/Dialect/HighLevel/qualifiers-a.cpp @@ -17,12 +17,12 @@ void scope() { // CHECK: hl.var @us : !hl.lvalue> unsigned short us; - // CHECK: hl.var @ci : !hl.lvalue> = { + // CHECK: hl.var @ci constant : !hl.lvalue> = { // CHECK: [[C1:%[0-9]+]] = hl.const #core.integer<0> : !hl.int // CHECK: hl.value.yield [[C1]] const int ci = 0; - // CHECK: hl.var @cui : !hl.lvalue> = { + // CHECK: hl.var @cui constant : !hl.lvalue> = { // CHECK: [[C2:%[0-9]+]] = hl.const #core.integer<0> : !hl.int< unsigned > // CHECK: hl.value.yield [[C2]] const unsigned cui = 0U; @@ -33,12 +33,12 @@ void scope() { // CHECK: hl.var @vui : !hl.lvalue> volatile unsigned vui; - // CHECK: hl.var @cvi : !hl.lvalue> = { + // CHECK: hl.var @cvi constant : !hl.lvalue> = { // CHECK: [[C3:%[0-9]+]] = hl.const #core.integer<0> : !hl.int // CHECK: hl.value.yield [[C3]] const volatile int cvi = 0; - // CHECK: hl.var @cvui : !hl.lvalue> = { + // CHECK: hl.var @cvui constant : !hl.lvalue> = { // CHECK: [[C4:%[0-9]+]] = hl.const #core.integer<0> : !hl.int< unsigned > // CHECK: hl.value.yield [[C4]] const volatile unsigned int cvui = 0U; @@ -49,12 +49,12 @@ void scope() { // CHECK: hl.var @vb : !hl.lvalue> volatile bool vb; - // CHECK: hl.var @cb : !hl.lvalue> = { + // CHECK: hl.var @cb constant : !hl.lvalue> = { // CHECK: [[C5:%[0-9]+]] = hl.const #false // CHECK: hl.value.yield [[C5]] const bool cb = false; - // CHECK: hl.var @cvb : !hl.lvalue> = { + // CHECK: hl.var @cvb constant : !hl.lvalue> = { // CHECK: [[C6:%[0-9]+]] = hl.const #true // CHECK: hl.value.yield [[C6]] const volatile bool cvb = true; diff --git a/test/vast/Dialect/HighLevel/qualifiers-e.c b/test/vast/Dialect/HighLevel/qualifiers-e.c index c43a677dea..c318dba7b9 100644 --- a/test/vast/Dialect/HighLevel/qualifiers-e.c +++ b/test/vast/Dialect/HighLevel/qualifiers-e.c @@ -4,11 +4,11 @@ // CHECK: hl.var @ia, : !hl.lvalue> int ia[10]; -// CHECK: hl.var @cia, : !hl.lvalue>> +// CHECK: hl.var @cia, constant : !hl.lvalue>> const int cia[10]; // CHECK: hl.var @via, : !hl.lvalue>> volatile int via[10]; -// CHECK: hl.var @cvia, : !hl.lvalue>> +// CHECK: hl.var @cvia, constant : !hl.lvalue>> const volatile int cvia[10]; diff --git a/test/vast/Dialect/HighLevel/qualifiers-h.c b/test/vast/Dialect/HighLevel/qualifiers-h.c index f0f65523b0..a9d51e8151 100644 --- a/test/vast/Dialect/HighLevel/qualifiers-h.c +++ b/test/vast/Dialect/HighLevel/qualifiers-h.c @@ -7,10 +7,10 @@ enum e { a, b, c }; // CHECK: hl.var @v, : !hl.lvalue>> enum e v; -// CHECK: hl.var @cv, : !hl.lvalue, const >> +// CHECK: hl.var @cv, constant : !hl.lvalue, const >> const enum e cv; -// CHECK: hl.var @cvv, : !hl.lvalue, const, volatile >> +// CHECK: hl.var @cvv, constant : !hl.lvalue, const, volatile >> const volatile enum e cvv; // CHECK: hl.typedef @def : !hl.elaborated> @@ -19,11 +19,11 @@ typedef enum e def; // CHECK: hl.var @d, : !hl.lvalue>> def d; -// CHECK: hl.var @cd, : !hl.lvalue, const >> +// CHECK: hl.var @cd, constant : !hl.lvalue, const >> const def cd; // CHECK: hl.var @vd, : !hl.lvalue, volatile >> volatile def vd; -// CHECK: hl.var @cvd, : !hl.lvalue, const, volatile >> +// CHECK: hl.var @cvd, constant : !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 96a410f3ce..fc09eed015 100644 --- a/test/vast/Dialect/HighLevel/qualifiers-i.c +++ b/test/vast/Dialect/HighLevel/qualifiers-i.c @@ -7,10 +7,10 @@ union u { int i; double d; }; // CHECK: hl.var @v, : !hl.lvalue>> union u v; -// CHECK: hl.var @cv, : !hl.lvalue, const >> +// CHECK: hl.var @cv, constant : !hl.lvalue, const >> const union u cv; -// CHECK: hl.var @cvv, : !hl.lvalue, const, volatile >> +// CHECK: hl.var @cvv, constant : !hl.lvalue, const, volatile >> const volatile union u cvv; // CHECK: hl.typedef @e : !hl.elaborated> @@ -19,11 +19,11 @@ typedef union u e; // CHECK: hl.var @v, : !hl.lvalue>> e v; -// CHECK: hl.var @cv, : !hl.lvalue, const >> +// CHECK: hl.var @cv, constant : !hl.lvalue, const >> const e cv; // CHECK: hl.var @vv, : !hl.lvalue, volatile >> volatile e vv; -// CHECK: hl.var @cvv, : !hl.lvalue, const, volatile >> +// CHECK: hl.var @cvv, constant : !hl.lvalue, const, volatile >> const volatile e cvv; diff --git a/test/vast/Dialect/HighLevel/quirks-j.c b/test/vast/Dialect/HighLevel/quirks-j.c index a40f0e2e02..a3c585e50b 100644 --- a/test/vast/Dialect/HighLevel/quirks-j.c +++ b/test/vast/Dialect/HighLevel/quirks-j.c @@ -14,7 +14,7 @@ void foo() { int a[2]; // CHECK: hl.var @i : !hl.lvalue int i; - // CHECK: hl.var @j : !hl.lvalue> + // CHECK: hl.var @j constant : !hl.lvalue> const int j; // CHECK: hl.var @bf : !hl.lvalue>> struct bitfield bf; diff --git a/test/vast/Dialect/HighLevel/quirks-n.c b/test/vast/Dialect/HighLevel/quirks-n.c index 6e911ccc1e..89e6493dbf 100644 --- a/test/vast/Dialect/HighLevel/quirks-n.c +++ b/test/vast/Dialect/HighLevel/quirks-n.c @@ -16,5 +16,5 @@ struct foo { int bar; } const typedef baz; s16 a; // CHECK: hl.var @b, : !hl.lvalue>> u32 b; -// CHECK: hl.var @c, : !hl.lvalue>> +// CHECK: hl.var @c, constant : !hl.lvalue>> baz c; diff --git a/test/vast/Dialect/HighLevel/typeof-b.c b/test/vast/Dialect/HighLevel/typeof-b.c index d99dcf2f07..ae1cef9d01 100644 --- a/test/vast/Dialect/HighLevel/typeof-b.c +++ b/test/vast/Dialect/HighLevel/typeof-b.c @@ -2,7 +2,7 @@ // RUN: %vast-front -vast-emit-mlir=hl -o - %s > %t && %vast-opt %t | diff -B %t - int main() { -// CHECK: hl.var @i : !hl.lvalue> +// CHECK: hl.var @i constant : !hl.lvalue> const int i = 0; // CHECK: hl.typeof.expr "(i)" { @@ -10,10 +10,10 @@ const int i = 0; // CHECK: } // CHECK: hl.type.yield {{.*}} : !hl.lvalue> // CHECK: } : !hl.int< const > -// CHECK: hl.var @j : !hl.lvalue> +// CHECK: hl.var @j constant : !hl.lvalue> // CHECK: hl.const #core.integer<0> : !hl.int typeof(i) j = 0; -// CHECK: {{.* hl.var @k : !hl.lvalue>>.*}} +// CHECK: {{.* hl.var @k constant : !hl.lvalue>>.*}} typeof(const int) k = 0; return 0; } diff --git a/test/vast/Dialect/HighLevel/typeof-c.c b/test/vast/Dialect/HighLevel/typeof-c.c index e40954fa60..2f8d5a2b5b 100644 --- a/test/vast/Dialect/HighLevel/typeof-c.c +++ b/test/vast/Dialect/HighLevel/typeof-c.c @@ -10,10 +10,10 @@ int i = 0; // CHECK: } // CHECK: hl.type.yield {{.*}} : !hl.lvalue // CHECK: } : !hl.int -// CHECK: hl.var @j : !hl.lvalue> +// CHECK: hl.var @j constant : !hl.lvalue> // CHECK: hl.const #core.integer<0> : !hl.int const typeof(i) j = 0; -// CHECK: hl.var @k : !hl.lvalue> +// CHECK: hl.var @k constant : !hl.lvalue> const typeof(int) k = 0; return 0; } diff --git a/test/vast/Transform/HL/LowerTypes/array-a.c b/test/vast/Transform/HL/LowerTypes/array-a.c index 8eb3d10b68..9d1469135f 100644 --- a/test/vast/Transform/HL/LowerTypes/array-a.c +++ b/test/vast/Transform/HL/LowerTypes/array-a.c @@ -3,16 +3,16 @@ // CHECK: hl.var @ai, : !hl.lvalue> int ai[10]; -// CHECK: hl.var @aci, : !hl.lvalue> +// CHECK: hl.var @aci, constant : !hl.lvalue> const int aci[5]; // CHECK: hl.var @avi, : !hl.lvalue> volatile int avi[5]; -// CHECK: hl.var @acvi, : !hl.lvalue> +// CHECK: hl.var @acvi, constant : !hl.lvalue> const volatile int acvi[5]; -// CHECK: hl.var @acvui, : !hl.lvalue> +// CHECK: hl.var @acvui, constant : !hl.lvalue> const volatile unsigned int acvui[5]; // CHECK: hl.var @af, : !hl.lvalue> diff --git a/test/vast/Transform/HL/LowerTypes/vars-c.c b/test/vast/Transform/HL/LowerTypes/vars-c.c index 51cae14595..344dbd845e 100644 --- a/test/vast/Transform/HL/LowerTypes/vars-c.c +++ b/test/vast/Transform/HL/LowerTypes/vars-c.c @@ -7,11 +7,11 @@ int main() // CHECK: [[V1:%[0-9]+]] = hl.const #core.integer<0> : si32 // CHECK: hl.value.yield [[V1]] : si32 int x = 0; - // CHECK: hl.var @cx : !hl.lvalue = { + // CHECK: hl.var @cx constant : !hl.lvalue = { // CHECK: [[V2:%[0-9]+]] = hl.const #core.integer<0> : si32 // CHECK: hl.value.yield [[V2]] : si32 const int cx = 0; - // CHECK: hl.var @cvx : !hl.lvalue = { + // CHECK: hl.var @cvx constant : !hl.lvalue = { // CHECK: [[V3:%[0-9]+]] = hl.const #core.integer<0> : si32 // CHECK: hl.value.yield [[V3]] : si32 const volatile int cvx = 0;