Do not rely on getSpecializations.
The getSpecialization interface now deserializes lazily template specializations. While unloading we trigger creation of new specializations which does not make sense.
This commit is contained in:
parent
51acb456a1
commit
3a82a25051
@ -590,7 +590,7 @@ bool DeclUnloader::VisitRedeclarable(clang::Redeclarable<T>* R, DeclContext* DC)
|
||||
|
||||
FunctionTemplateDeclExt* This = (FunctionTemplateDeclExt*) self;
|
||||
Specializations specializations;
|
||||
const Set& specs = This->getSpecializations();
|
||||
const Set& specs = This->getCommonPtr()->Specializations;
|
||||
|
||||
if (!specs.size()) // nothing to remove
|
||||
return;
|
||||
@ -602,7 +602,7 @@ bool DeclUnloader::VisitRedeclarable(clang::Redeclarable<T>* R, DeclContext* DC)
|
||||
specializations.push_back(I->Function);
|
||||
}
|
||||
|
||||
This->getSpecializations().clear();
|
||||
This->getCommonPtr()->Specializations.clear();
|
||||
|
||||
//Readd the collected specializations.
|
||||
void* InsertPos = 0;
|
||||
@ -965,7 +965,7 @@ bool DeclUnloader::VisitRedeclarable(clang::Redeclarable<T>* R, DeclContext* DC)
|
||||
|
||||
ClassTemplateDeclExt* This = (ClassTemplateDeclExt*) self;
|
||||
Specializations specializations;
|
||||
Set& specs = This->getSpecializations();
|
||||
Set& specs = This->getCommonPtr()->Specializations;
|
||||
|
||||
if (!specs.size()) // nothing to remove
|
||||
return;
|
||||
@ -976,7 +976,7 @@ bool DeclUnloader::VisitRedeclarable(clang::Redeclarable<T>* R, DeclContext* DC)
|
||||
specializations.push_back(&*I);
|
||||
}
|
||||
|
||||
This->getSpecializations().clear();
|
||||
This->getCommonPtr()->Specializations.clear();
|
||||
|
||||
//Readd the collected specializations.
|
||||
void* InsertPos = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user