// RUN: %clang_cc1 -no-opaque-pointers %s -triple "spir-unknown-unknown" -emit-llvm -o - | FileCheck %s
int get_dummy_id;
kernel void bar;
kernel void foo
// CHECK: define{{.*}} spir_kernel void @foo
{
int id = get_dummy_id;
// CHECK: %{{[a-z0-9_]+}} = tail call spir_func i32 @get_dummy_id
A[id] = id;
bar;
// CHECK: tail call spir_kernel void @bar
}
// CHECK: declare spir_func i32 @get_dummy_id
// CHECK: declare spir_kernel void @bar