llvm-project/clang/test/CodeGenHLSL/group_shared.hlsl
Steven Perron a027eb4472
[HLSL] Use hidden visibility for external linkage. (#140292)
Implements

https://github.com/llvm/wg-hlsl/blob/main/proposals/0026-symbol-visibility.md.

The change is to stop using the `hlsl.export` attribute. Instead,
symbols with "program linkage" in HLSL will have export linkage with
default visibility, and symbols with "external linkage" in HLSL will
have export linkage with hidden visibility.
2025-06-16 16:44:55 -04:00

20 lines
565 B
HLSL

// RUN: %clang_cc1 -std=hlsl2021 -finclude-default-header -x hlsl -triple \
// RUN: dxil-pc-shadermodel6.3-library %s \
// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s
// RUN: %clang_cc1 -std=hlsl2021 -finclude-default-header -x hlsl -triple \
// RUN: spirv-unknown-vulkan1.3-compute %s \
// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s
// Make sure groupshared translated into address space 3.
// CHECK:@a = hidden addrspace(3) global [10 x float]
groupshared float a[10];
[numthreads(8,8,1)]
void main() {
a[0] = 1;
}