@@ -4689,15 +4689,15 @@ static void forAllLaterRedecls(DeclT *D, Fn F) {
4689
4689
void ASTDeclReader::UpdateDecl (Decl *D) {
4690
4690
while (Record.getIdx () < Record.size ()) {
4691
4691
switch ((DeclUpdateKind)Record.readInt ()) {
4692
- case UPD_CXX_ADDED_IMPLICIT_MEMBER : {
4692
+ case DeclUpdateKind::CXXAddedImplicitMember : {
4693
4693
auto *RD = cast<CXXRecordDecl>(D);
4694
4694
Decl *MD = Record.readDecl ();
4695
4695
assert (MD && " couldn't read decl from update record" );
4696
4696
Reader.PendingAddedClassMembers .push_back ({RD, MD});
4697
4697
break ;
4698
4698
}
4699
4699
4700
- case UPD_CXX_ADDED_ANONYMOUS_NAMESPACE : {
4700
+ case DeclUpdateKind::CXXAddedAnonymousNamespace : {
4701
4701
auto *Anon = readDeclAs<NamespaceDecl>();
4702
4702
4703
4703
// Each module has its own anonymous namespace, which is disjoint from
@@ -4712,15 +4712,15 @@ void ASTDeclReader::UpdateDecl(Decl *D) {
4712
4712
break ;
4713
4713
}
4714
4714
4715
- case UPD_CXX_ADDED_VAR_DEFINITION : {
4715
+ case DeclUpdateKind::CXXAddedVarDefinition : {
4716
4716
auto *VD = cast<VarDecl>(D);
4717
4717
VD->NonParmVarDeclBits .IsInline = Record.readInt ();
4718
4718
VD->NonParmVarDeclBits .IsInlineSpecified = Record.readInt ();
4719
4719
ReadVarDeclInit (VD);
4720
4720
break ;
4721
4721
}
4722
4722
4723
- case UPD_CXX_POINT_OF_INSTANTIATION : {
4723
+ case DeclUpdateKind::CXXPointOfInstantiation : {
4724
4724
SourceLocation POI = Record.readSourceLocation ();
4725
4725
if (auto *VTSD = dyn_cast<VarTemplateSpecializationDecl>(D)) {
4726
4726
VTSD->setPointOfInstantiation (POI);
@@ -4740,7 +4740,7 @@ void ASTDeclReader::UpdateDecl(Decl *D) {
4740
4740
break ;
4741
4741
}
4742
4742
4743
- case UPD_CXX_INSTANTIATED_DEFAULT_ARGUMENT : {
4743
+ case DeclUpdateKind::CXXInstantiatedDefaultArgument : {
4744
4744
auto *Param = cast<ParmVarDecl>(D);
4745
4745
4746
4746
// We have to read the default argument regardless of whether we use it
@@ -4755,7 +4755,7 @@ void ASTDeclReader::UpdateDecl(Decl *D) {
4755
4755
break ;
4756
4756
}
4757
4757
4758
- case UPD_CXX_INSTANTIATED_DEFAULT_MEMBER_INITIALIZER : {
4758
+ case DeclUpdateKind::CXXInstantiatedDefaultMemberInitializer : {
4759
4759
auto *FD = cast<FieldDecl>(D);
4760
4760
auto *DefaultInit = Record.readExpr ();
4761
4761
@@ -4772,7 +4772,7 @@ void ASTDeclReader::UpdateDecl(Decl *D) {
4772
4772
break ;
4773
4773
}
4774
4774
4775
- case UPD_CXX_ADDED_FUNCTION_DEFINITION : {
4775
+ case DeclUpdateKind::CXXAddedFunctionDefinition : {
4776
4776
auto *FD = cast<FunctionDecl>(D);
4777
4777
if (Reader.PendingBodies [FD]) {
4778
4778
// FIXME: Maybe check for ODR violations.
@@ -4794,7 +4794,7 @@ void ASTDeclReader::UpdateDecl(Decl *D) {
4794
4794
break ;
4795
4795
}
4796
4796
4797
- case UPD_CXX_INSTANTIATED_CLASS_DEFINITION : {
4797
+ case DeclUpdateKind::CXXInstantiatedClassDefinition : {
4798
4798
auto *RD = cast<CXXRecordDecl>(D);
4799
4799
auto *OldDD = RD->getCanonicalDecl ()->DefinitionData ;
4800
4800
bool HadRealDefinition =
@@ -4855,7 +4855,7 @@ void ASTDeclReader::UpdateDecl(Decl *D) {
4855
4855
break ;
4856
4856
}
4857
4857
4858
- case UPD_CXX_RESOLVED_DTOR_DELETE : {
4858
+ case DeclUpdateKind::CXXResolvedDtorDelete : {
4859
4859
// Set the 'operator delete' directly to avoid emitting another update
4860
4860
// record.
4861
4861
auto *Del = readDeclAs<FunctionDecl>();
@@ -4869,7 +4869,7 @@ void ASTDeclReader::UpdateDecl(Decl *D) {
4869
4869
break ;
4870
4870
}
4871
4871
4872
- case UPD_CXX_RESOLVED_EXCEPTION_SPEC : {
4872
+ case DeclUpdateKind::CXXResolvedExceptionSpec : {
4873
4873
SmallVector<QualType, 8 > ExceptionStorage;
4874
4874
auto ESI = Record.readExceptionSpecInfo (ExceptionStorage);
4875
4875
@@ -4891,35 +4891,35 @@ void ASTDeclReader::UpdateDecl(Decl *D) {
4891
4891
break ;
4892
4892
}
4893
4893
4894
- case UPD_CXX_DEDUCED_RETURN_TYPE : {
4894
+ case DeclUpdateKind::CXXDeducedReturnType : {
4895
4895
auto *FD = cast<FunctionDecl>(D);
4896
4896
QualType DeducedResultType = Record.readType ();
4897
4897
Reader.PendingDeducedTypeUpdates .insert (
4898
4898
{FD->getCanonicalDecl (), DeducedResultType});
4899
4899
break ;
4900
4900
}
4901
4901
4902
- case UPD_DECL_MARKED_USED :
4902
+ case DeclUpdateKind::DeclMarkedUsed :
4903
4903
// Maintain AST consistency: any later redeclarations are used too.
4904
4904
D->markUsed (Reader.getContext ());
4905
4905
break ;
4906
4906
4907
- case UPD_MANGLING_NUMBER :
4907
+ case DeclUpdateKind::ManglingNumber :
4908
4908
Reader.getContext ().setManglingNumber (cast<NamedDecl>(D),
4909
4909
Record.readInt ());
4910
4910
break ;
4911
4911
4912
- case UPD_STATIC_LOCAL_NUMBER :
4912
+ case DeclUpdateKind::StaticLocalNumber :
4913
4913
Reader.getContext ().setStaticLocalNumber (cast<VarDecl>(D),
4914
4914
Record.readInt ());
4915
4915
break ;
4916
4916
4917
- case UPD_DECL_MARKED_OPENMP_THREADPRIVATE :
4917
+ case DeclUpdateKind::DeclMarkedOpenMPThreadPrivate :
4918
4918
D->addAttr (OMPThreadPrivateDeclAttr::CreateImplicit (Reader.getContext (),
4919
4919
readSourceRange ()));
4920
4920
break ;
4921
4921
4922
- case UPD_DECL_MARKED_OPENMP_ALLOCATE : {
4922
+ case DeclUpdateKind::DeclMarkedOpenMPAllocate : {
4923
4923
auto AllocatorKind =
4924
4924
static_cast <OMPAllocateDeclAttr::AllocatorTypeTy>(Record.readInt ());
4925
4925
Expr *Allocator = Record.readExpr ();
@@ -4930,7 +4930,7 @@ void ASTDeclReader::UpdateDecl(Decl *D) {
4930
4930
break ;
4931
4931
}
4932
4932
4933
- case UPD_DECL_EXPORTED : {
4933
+ case DeclUpdateKind::DeclExported : {
4934
4934
unsigned SubmoduleID = readSubmoduleID ();
4935
4935
auto *Exported = cast<NamedDecl>(D);
4936
4936
Module *Owner = SubmoduleID ? Reader.getSubmodule (SubmoduleID) : nullptr ;
@@ -4939,7 +4939,7 @@ void ASTDeclReader::UpdateDecl(Decl *D) {
4939
4939
break ;
4940
4940
}
4941
4941
4942
- case UPD_DECL_MARKED_OPENMP_DECLARETARGET : {
4942
+ case DeclUpdateKind::DeclMarkedOpenMPDeclareTarget : {
4943
4943
auto MapType = Record.readEnum <OMPDeclareTargetDeclAttr::MapTypeTy>();
4944
4944
auto DevType = Record.readEnum <OMPDeclareTargetDeclAttr::DevTypeTy>();
4945
4945
Expr *IndirectE = Record.readExpr ();
@@ -4951,7 +4951,7 @@ void ASTDeclReader::UpdateDecl(Decl *D) {
4951
4951
break ;
4952
4952
}
4953
4953
4954
- case UPD_ADDED_ATTR_TO_RECORD :
4954
+ case DeclUpdateKind::AddedAttrToRecord :
4955
4955
AttrVec Attrs;
4956
4956
Record.readAttributes (Attrs);
4957
4957
assert (Attrs.size () == 1 );
0 commit comments