================
@@ -2950,6 +2950,21 @@ QualType ParmVarDecl::getOriginalType() const {
return T;
}
+std::string
+ParmVarDecl::getHLSLParamTypeAsWritten(const PrintingPolicy &Policy) const {
+ if (const auto *Mod = getAttr<HLSLParamModifierAttr>()) {
+ QualType BaseType = getType().getNonReferenceType();
+ std::string BaseHLSLType = BaseType.getAsString(Policy);
+
+ if (Mod->isOut())
+ return "out " + BaseHLSLType;
+ if (Mod->isInOut())
+ return "inout " + BaseHLSLType;
+ }
----------------
mafeguimaraes wrote:
Yes, if it's not `out` or `inout`, it's `in`, so we just fall through to the
existing code that already handles that case.
https://github.com/llvm/llvm-project/pull/214883
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits