Files
llvm/clang/test/CodeGenHLSL/export.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

19 lines
430 B
HLSL

// RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.3-library %s \
// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s
// CHECK: define void @_Z2f1v() [[Attr:\#[0-9]+]]
export void f1() {
}
// CHECK: define void @_ZN11MyNamespace2f2Ev()
namespace MyNamespace {
export void f2() {
}
}
export {
// CHECK: define void @_Z2f3v()
// CHECK: define void @_Z2f4v()
void f3() {}
void f4() {}
}