[clang] [HLSL] set alwaysinline on HLSL functions (PR #106588)

Damyan Pepper via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 5 14:15:57 PDT 2024


================
@@ -0,0 +1,74 @@
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -std=hlsl202x -emit-llvm -o - -disable-llvm-passes %s | FileCheck %s --check-prefixes=CHECK,NOINLINE
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -std=hlsl202x -emit-llvm -o - -disable-llvm-passes %s | FileCheck %s --check-prefixes=CHECK,NOINLINE
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -std=hlsl202x -emit-llvm -o - -O0 %s | FileCheck %s --check-prefixes=CHECK,INLINE
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -std=hlsl202x -emit-llvm -o - -O0 %s | FileCheck %s --check-prefixes=CHECK,INLINE
+
+// Tests that implicit contstructor calls for user classes will always be inlined.
----------------
damyanp wrote:

typo

```suggestion
// Tests that implicit constructor calls for user classes will always be inlined.
```

https://github.com/llvm/llvm-project/pull/106588


More information about the cfe-commits mailing list