================
@@ -6888,6 +6888,42 @@ static void SetNestedNameSpecifier(Sema &S,
DeclaratorDecl *DD, Declarator &D) {
DD->setQualifierInfo(SS.getWithLocInContext(S.Context));
}
+void Sema::deduceHLSLAddressSpace(VarDecl *Decl) {
+ // The variable already has an address space (groupshared for ex).
+ if (Decl->getType().hasAddressSpace())
+ return;
+
+ if (Decl->getType()->isDependentType())
+ return;
+
+ QualType Type = Decl->getType();
+ if (Type->isSamplerT() || Type->isVoidType())
+ return;
+
+ // Template instantiations can lack definition. In such case,
+ // we cannot deduce the AS.
+ // FIXME: figure out why RWBuffer<float> yields such declaration.
----------------
Keenuts wrote:
It was when using RWBuffers, but looks like I cannot reproduce since I rebased.
Probably one of the RWBuffer related fixes that landed since.
Removed this part of the code!
https://github.com/llvm/llvm-project/pull/133464
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits