[clang] [HLSL] Resource initialization by constructors (PR #135120)
Ashley Coleman via cfe-commits
cfe-commits at lists.llvm.org
Fri Apr 11 12:00:47 PDT 2025
================
@@ -287,6 +287,24 @@ Value *CodeGenFunction::EmitHLSLBuiltinExpr(unsigned BuiltinID,
RetTy, CGM.getHLSLRuntime().getCreateResourceGetPointerIntrinsic(),
ArrayRef<Value *>{HandleOp, IndexOp});
}
+ case Builtin::BI__builtin_hlsl_resource_createpoisonhandle: {
+ llvm::Type *HandleTy = CGM.getTypes().ConvertType(E->getType());
+ return llvm::PoisonValue::get(HandleTy);
+ }
+ case Builtin::BI__builtin_hlsl_resource_createhandlefrombinding: {
+ llvm::Type *HandleTy = CGM.getTypes().ConvertType(E->getType());
+ Value *RegisterNoOp = EmitScalarExpr(E->getArg(1));
----------------
V-FEXrt wrote:
nit: What does `No` in `RegisterNoOp` mean? It initially reads to me as no-op but that doesn't make sense given the context. Is it short for number? If so, maybe `Num` is better
https://github.com/llvm/llvm-project/pull/135120
More information about the cfe-commits
mailing list