================ @@ -115,6 +116,18 @@ GlobalVariable *replaceBuffer(CGHLSLRuntime::Buffer &Buf) { } // namespace +llvm::Type *CGHLSLRuntime::convertHLSLSpecificType(const Type *T) { + assert(T->isHLSLSpecificType() && "Not an HLSL specific type!"); + + // Check if the target has a specific translation for this type first. + if (llvm::Type *TargetTy = CGM.getTargetCodeGenInfo().getHLSLType(CGM, T)) + return TargetTy; + + // TODO: What do we actually want to do generically here? OpenCL uses a + // pointer in a particular address space. + llvm_unreachable("Generic handling of HLSL types is not implemented yet"); ---------------- bogner wrote:
For DirectX and SPIR-V we'll implement `getHLSLType` and this should really be unreachable, but we may want to do something generic in the future if/when we want to generate code for GPU or CPU targets directly generically. Something like the OpenCL approach mentioned in the comment might make sense in that case. https://github.com/llvm/llvm-project/pull/97362 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits