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