================
@@ -4855,6 +4857,17 @@ LinkageInfo 
LinkageComputer::computeTypeLinkageInfo(const Type *T) {
     return computeTypeLinkageInfo(cast<HLSLAttributedResourceType>(T)
                                       ->getContainedType()
                                       ->getCanonicalTypeInternal());
+  case Type::HLSLInlineSpirv:
+    return LinkageInfo::external();
+    {
----------------
s-perron wrote:

I don't know if we can have different linkages on types in HLSL. You cannot put 
a type in the  anonymous namespace. You can't use 
`__attribute__((internal_linkage))`. I'm not sure how we would test this 
properly.

In the HLSL source, this is a type with a templates that build the type. Change 
the template parameters, change the type. I don't know if this causes it to be 
classified as a dependent type, and should always return `external` as is done 
for all dependent types. If that is true, then we should label this as a 
dependent type in TypeNodes.td.

The argument for the removing the return is that if one of the templates is say 
an internal type, then the vk::SpirvType should be internal too, as is done for 
functions with a parameter type that is internal. As I said before, we would 
not be able to test this.

@llvm-beanz @AaronBallman Let me know if you know the right way to do this.

FYI: Cassie is no longer working on this. I'll see if I can fix it up.

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

Reply via email to