xref: /llvm-project/clang/test/CodeGenHLSL/shader_type_attr.hlsl (revision 8b2f8b309885e872ad98af381ee5459716955877)
1// RUN: %clang_cc1 -std=hlsl2021 -finclude-default-header -x hlsl -triple \
2// RUN:   dxil-pc-shadermodel6.3-library %s -fnative-half-type \
3// RUN:   -emit-llvm -disable-llvm-passes -o - | FileCheck %s
4
5// Make sure not mangle entry.
6// CHECK:define void @foo()
7// Make sure add function attribute.
8// CHECK:"hlsl.shader"="compute"
9[shader("compute")]
10[numthreads(1,1,1)]
11void foo() {
12
13}
14