clang/test/CodeGenHLSL/shader_type_attr.hlsl
raw| 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)] |
| 11 | void foo() { |
| 12 | |
| 13 | } |