Xiang Li 906e41f4e3 [HLSL] clang codeGen for HLSLShaderAttr.
Translate HLSLShaderAttr to IR level.
 1. Skip mangle for hlsl entry functions.
 2. Add function attribute for hlsl entry functions.

Reviewed By: Anastasia

Differential Revision: https://reviews.llvm.org/D124752
2022-08-04 21:23:57 -07:00

11 lines
243 B
HLSL

// RUN: %clang --driver-mode=dxc -Tcs_6_1 -Efoo -fcgl -Fo - %s | FileCheck %s
// Make sure not mangle entry.
// CHECK:define void @foo()
// Make sure add function attribute.
// CHECK:"dx.shader"="compute"
[numthreads(1,1,1)]
void foo() {
}