================ @@ -1064,21 +1064,25 @@ SemaHLSL::ActOnStartRootSignatureDecl(StringRef Signature) { void SemaHLSL::ActOnFinishRootSignatureDecl( SourceLocation Loc, IdentifierInfo *DeclIdent, - SmallVector<llvm::hlsl::rootsig::RootElement> &Elements) { + ArrayRef<hlsl::RootSignatureElement> RootElements) { + + if (handleRootSignatureElements(RootElements, Loc)) + return; + + SmallVector<llvm::hlsl::rootsig::RootElement> Elements; + for (auto &RootSigElement : RootElements) + Elements.push_back(RootSigElement.getElement()); auto *SignatureDecl = HLSLRootSignatureDecl::Create( SemaRef.getASTContext(), /*DeclContext=*/SemaRef.CurContext, Loc, DeclIdent, SemaRef.getLangOpts().HLSLRootSigVer, Elements); - if (handleRootSignatureDecl(SignatureDecl, Loc)) - return; - SignatureDecl->setImplicit(); SemaRef.PushOnScopeChains(SignatureDecl, SemaRef.getCurScope()); } -bool SemaHLSL::handleRootSignatureDecl(HLSLRootSignatureDecl *D, - SourceLocation Loc) { +bool SemaHLSL::handleRootSignatureElements( + ArrayRef<hlsl::RootSignatureElement> Elements, SourceLocation Loc) { ---------------- inbelic wrote:
```suggestion ArrayRef<hlsl::RootSignatureElement> Elements) { ``` We no longer are required to use `Loc` https://github.com/llvm/llvm-project/pull/147094 _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits