Maria Fernanda =?utf-8?q?Guimarães?= <[email protected]>,
Maria Fernanda =?utf-8?q?Guimarães?= <[email protected]>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/[email protected]>
================
@@ -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;
+ }
----------------
inbelic wrote:
Is there a test case already for in? It would be good to add it to prove it is
as expected
https://github.com/llvm/llvm-project/pull/214883
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits