Skip to content

Commit bb4788a

Browse files
committed
Remove TPL argument from loadLazySpecializationsImpl
1 parent c8b3418 commit bb4788a

File tree

2 files changed

+12
-11
lines changed

2 files changed

+12
-11
lines changed

clang/include/clang/AST/DeclTemplate.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -776,18 +776,20 @@ class RedeclarableTemplateDecl : public TemplateDecl,
776776

777777
void loadLazySpecializationsImpl(bool OnlyPartial = false) const;
778778

779-
bool loadLazySpecializationsImpl(llvm::ArrayRef<TemplateArgument> Args,
780-
TemplateParameterList *TPL = nullptr) const;
779+
bool loadLazySpecializationsImpl(llvm::ArrayRef<TemplateArgument> Args) const;
781780

782781
template <class EntryType, typename ...ProfileArguments>
783782
typename SpecEntryTraits<EntryType>::DeclType*
784783
findSpecializationImpl(llvm::FoldingSetVector<EntryType> &Specs,
785-
void *&InsertPos, ProfileArguments &&...ProfileArgs);
784+
void *&InsertPos,
785+
llvm::ArrayRef<TemplateArgument> Args,
786+
ProfileArguments &&...ProfileArgs);
786787

787788
template <class EntryType, typename... ProfileArguments>
788789
typename SpecEntryTraits<EntryType>::DeclType *
789790
findSpecializationLocally(llvm::FoldingSetVector<EntryType> &Specs,
790791
void *&InsertPos,
792+
llvm::ArrayRef<TemplateArgument> Args,
791793
ProfileArguments &&...ProfileArgs);
792794

793795
template <class Derived, class EntryType>

clang/lib/AST/DeclTemplate.cpp

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ void RedeclarableTemplateDecl::loadLazySpecializationsImpl(
362362
}
363363

364364
bool RedeclarableTemplateDecl::loadLazySpecializationsImpl(
365-
ArrayRef<TemplateArgument> Args, TemplateParameterList *TPL) const {
365+
ArrayRef<TemplateArgument> Args) const {
366366
auto *ExternalSource = getASTContext().getExternalSource();
367367
if (!ExternalSource)
368368
return false;
@@ -375,11 +375,11 @@ template <class EntryType, typename... ProfileArguments>
375375
typename RedeclarableTemplateDecl::SpecEntryTraits<EntryType>::DeclType *
376376
RedeclarableTemplateDecl::findSpecializationLocally(
377377
llvm::FoldingSetVector<EntryType> &Specs, void *&InsertPos,
378-
ProfileArguments &&...ProfileArgs) {
378+
ArrayRef<TemplateArgument> Args, ProfileArguments &&...ProfileArgs) {
379379
using SETraits = RedeclarableTemplateDecl::SpecEntryTraits<EntryType>;
380380

381381
llvm::FoldingSetNodeID ID;
382-
EntryType::Profile(ID, std::forward<ProfileArguments>(ProfileArgs)...,
382+
EntryType::Profile(ID, Args, std::forward<ProfileArguments>(ProfileArgs)...,
383383
getASTContext());
384384
EntryType *Entry = Specs.FindNodeOrInsertPos(ID, InsertPos);
385385
return Entry ? SETraits::getDecl(Entry)->getMostRecentDecl() : nullptr;
@@ -389,18 +389,17 @@ template <class EntryType, typename... ProfileArguments>
389389
typename RedeclarableTemplateDecl::SpecEntryTraits<EntryType>::DeclType *
390390
RedeclarableTemplateDecl::findSpecializationImpl(
391391
llvm::FoldingSetVector<EntryType> &Specs, void *&InsertPos,
392-
ProfileArguments &&...ProfileArgs) {
392+
ArrayRef<TemplateArgument> Args, ProfileArguments &&...ProfileArgs) {
393393

394394
if (auto *Found = findSpecializationLocally(
395-
Specs, InsertPos, std::forward<ProfileArguments>(ProfileArgs)...))
395+
Specs, InsertPos, Args, std::forward<ProfileArguments>(ProfileArgs)...))
396396
return Found;
397397

398-
if (!loadLazySpecializationsImpl(
399-
std::forward<ProfileArguments>(ProfileArgs)...))
398+
if (!loadLazySpecializationsImpl(Args))
400399
return nullptr;
401400

402401
return findSpecializationLocally(
403-
Specs, InsertPos, std::forward<ProfileArguments>(ProfileArgs)...);
402+
Specs, InsertPos, Args, std::forward<ProfileArguments>(ProfileArgs)...);
404403
}
405404

406405
template<class Derived, class EntryType>

0 commit comments

Comments
 (0)