Skip to content

Commit e8a38f0

Browse files
committed
Adjust test to not assume size of 'unsigned'
1 parent 124ada4 commit e8a38f0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

clang/test/CodeGen/fake-use-scalar.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ int foo(volatile int vol_param, int param)
2121
struct SmallAggr small;
2222
volatile int vol_local;
2323
int local;
24-
char long_arr[17];
25-
char short_arr[16];
24+
unsigned long_arr[5];
25+
unsigned short_arr[4];
2626
return 0;
2727
}
2828

29-
// CHECK: [[SMALL_ARR_FAKE_USE:%.+]] = load [16 x i8], ptr %short_arr
30-
// CHECK: call void (...) @llvm.fake.use([16 x i8] [[SMALL_ARR_FAKE_USE]])
29+
// CHECK: [[SMALL_ARR_FAKE_USE:%.+]] = load [4 x i[[#UINT_SIZE:]]], ptr %short_arr
30+
// CHECK: call void (...) @llvm.fake.use([4 x i[[#UINT_SIZE]]] [[SMALL_ARR_FAKE_USE]])
3131

3232
// CHECK: [[LOCAL_FAKE_USE:%.+]] = load i32, ptr %local
3333
// CHECK: call void (...) @llvm.fake.use(i32 [[LOCAL_FAKE_USE]])

0 commit comments

Comments
 (0)