================ @@ -271,53 +246,70 @@ struct BuiltinTypeDeclBuilder { return *this; } + FieldDecl *getResourceHandleField() { + FieldDecl *FD = Fields["h"]; + assert(FD && FD->getType()->isHLSLAttributedResourceType() && + "record does not have resource handle"); + return FD; + } + + QualType getFirstTemplateTypeParam() { + assert(Template && "record it not a template"); + if (const auto *TTD = dyn_cast<TemplateTypeParmDecl>( + Template->getTemplateParameters()->getParam(0))) { + return QualType(TTD->getTypeForDecl(), 0); + } + return QualType(); + } + BuiltinTypeDeclBuilder &startDefinition() { - if (Record->isCompleteDefinition()) - return *this; + // we might already have complete definition from a precompiled header + assert(!Record->isCompleteDefinition() && "record is already complete"); ---------------- pow2clk wrote:
If we might already have the definition, then we shouldn't assert here. https://github.com/llvm/llvm-project/pull/114148 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits