================
@@ -1,34 +1,117 @@
-// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -emit-llvm 
-disable-llvm-passes -o - %s | FileCheck %s --check-prefixes=CHECK,CHECK-DXIL
+// RUN: %clang_cc1 -Wno-hlsl-implicit-binding -triple 
dxil-pc-shadermodel6.3-library -emit-llvm -disable-llvm-passes -o - %s | 
FileCheck %s --check-prefixes=CHECK,CHECK-DXIL
+// FIXME: SPIR-V codegen of llvm.spv.resource.handlefrombinding and resource 
types is not yet implemented
 // RUN-DISABLED: %clang_cc1 -triple spirv-vulkan-library -x hlsl -emit-llvm 
-disable-llvm-passes -o - %s | FileCheck %s --check-prefixes=CHECK,CHECK-SPIRV
 
-// NOTE: SPIRV codegen for resource types is not yet implemented
+// NOTE: Itanium ABI for C++ requires Clang to generate 2 constructors types 
to support polymorphism:
+// - C1 - Complete object constructor - constructs the complete object, 
including virtual base classes.
+// - C2 - Base object constructor - creates the object itself and initializes 
data members and non-virtual base classes.
+// The constructors are distinquished by C1/C2 designators in their mangled 
name.
+// 
https://itanium-cxx-abi.github.io/cxx-abi/abi.html#mangling-special-ctor-dtor
 
-ByteAddressBuffer Buffer0: register(t0);
-RWByteAddressBuffer Buffer1: register(u1, space2);
-RasterizerOrderedByteAddressBuffer Buffer2: register(u3, space4);
+// Resource with explicit binding
+ByteAddressBuffer Buf1: register(t1, space2);
----------------
bogner wrote:

```suggestion
ByteAddressBuffer Buf1 : register(t1, space2);
```

https://github.com/llvm/llvm-project/pull/135120
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to