66// This file is distributed under the University of Illinois Open Source //
77// License. See LICENSE.TXT for details. //
88// //
9+ // Modifications Copyright(C) 2025 Advanced Micro Devices, Inc. //
10+ // All rights reserved. //
11+ // //
912// /
1013// / \file //
1114// / \brief Defines the HLSL type system interface. //
3134namespace clang {
3235class ASTContext ;
3336class AttributeList ;
37+ class CXXConstructorDecl ;
3438class CXXMethodDecl ;
3539class CXXRecordDecl ;
3640class ClassTemplateDecl ;
@@ -402,6 +406,10 @@ DeclareNodeOrRecordType(clang::ASTContext &Ctx, DXIL::NodeIOKind Type,
402406 bool IsCompleteType = false );
403407
404408#ifdef ENABLE_SPIRV_CODEGEN
409+ clang::CXXRecordDecl *
410+ DeclareVkBufferPointerType (clang::ASTContext &context,
411+ clang::DeclContext *declContext);
412+
405413clang::CXXRecordDecl *DeclareInlineSpirvType (clang::ASTContext &context,
406414 clang::DeclContext *declContext,
407415 llvm::StringRef typeName,
@@ -427,7 +435,7 @@ clang::VarDecl *DeclareBuiltinGlobal(llvm::StringRef name, clang::QualType Ty,
427435// / method.</summary> <param name="context">AST context in which to
428436// / work.</param> <param name="recordDecl">Class in which the function template
429437// / is declared.</param> <param name="functionDecl">Function for which a
430- // / template is created.</params > <param
438+ // / template is created.</param > <param
431439// / name="templateParamNamedDecls">Declarations for templates to the
432440// / function.</param> <param name="templateParamNamedDeclsCount">Count of
433441// / template declarations.</param> <returns>A new function template declaration
@@ -533,6 +541,29 @@ bool DoesTypeDefineOverloadedOperator(clang::QualType typeWithOperator,
533541 clang::QualType paramType);
534542bool IsPatchConstantFunctionDecl (const clang::FunctionDecl *FD);
535543
544+ #ifdef ENABLE_SPIRV_CODEGEN
545+ bool IsVKBufferPointerType (clang::QualType type);
546+ clang::QualType GetVKBufferPointerBufferType (clang::QualType type);
547+ unsigned GetVKBufferPointerAlignment (clang::QualType type);
548+ #endif
549+
550+ // / <summary>Adds a constructor declaration to the specified class
551+ // / record.</summary> <param name="context">ASTContext that owns
552+ // / declarations.</param> <param name="recordDecl">Record declaration in which
553+ // / to add constructor.</param> <param name="resultType">Result type for
554+ // / constructor.</param> <param name="paramTypes">Types for constructor
555+ // / parameters.</param> <param name="paramNames">Names for constructor
556+ // / parameters.</param> <param name="declarationName">Name for
557+ // / constructor.</param> <param name="isConst">Whether the constructor is a
558+ // / const function.</param> <returns>The method declaration for the
559+ // / constructor.</returns>
560+ clang::CXXConstructorDecl *CreateConstructorDeclarationWithParams (
561+ clang::ASTContext &context, clang::CXXRecordDecl *recordDecl,
562+ clang::QualType resultType, llvm::ArrayRef<clang::QualType> paramTypes,
563+ llvm::ArrayRef<clang::StringRef> paramNames,
564+ clang::DeclarationName declarationName, bool isConst,
565+ bool isTemplateFunction = false );
566+
536567// / <summary>Adds a function declaration to the specified class
537568// / record.</summary> <param name="context">ASTContext that owns
538569// / declarations.</param> <param name="recordDecl">Record declaration in which
0 commit comments