diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2020-01-24 22:11:32 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2020-01-24 22:11:32 +0000 |
| commit | 8b67a9f01da8048d4ed0a3fefc890e684526cd6a (patch) | |
| tree | 3a477c21c59c764e17d8a794f3e240fc18bb740a /clang/lib/AST/ASTConcept.cpp | |
| parent | d225fe9c6746d065ebe184f96f2cfbafec025668 (diff) | |
Notes
Diffstat (limited to 'clang/lib/AST/ASTConcept.cpp')
| -rw-r--r-- | clang/lib/AST/ASTConcept.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/clang/lib/AST/ASTConcept.cpp b/clang/lib/AST/ASTConcept.cpp index fc32e768d92f8..c28a06bdf0b24 100644 --- a/clang/lib/AST/ASTConcept.cpp +++ b/clang/lib/AST/ASTConcept.cpp @@ -14,6 +14,10 @@ #include "clang/AST/ASTConcept.h" #include "clang/AST/ASTContext.h" +#include "clang/AST/Decl.h" +#include "clang/AST/TemplateBase.h" +#include "llvm/ADT/ArrayRef.h" +#include "llvm/ADT/FoldingSet.h" using namespace clang; ASTConstraintSatisfaction::ASTConstraintSatisfaction(const ASTContext &C, @@ -53,3 +57,12 @@ ASTConstraintSatisfaction::Create(const ASTContext &C, void *Mem = C.Allocate(size, alignof(ASTConstraintSatisfaction)); return new (Mem) ASTConstraintSatisfaction(C, Satisfaction); } + +void ConstraintSatisfaction::Profile( + llvm::FoldingSetNodeID &ID, const ASTContext &C, NamedDecl *ConstraintOwner, + ArrayRef<TemplateArgument> TemplateArgs) { + ID.AddPointer(ConstraintOwner); + ID.AddInteger(TemplateArgs.size()); + for (auto &Arg : TemplateArgs) + Arg.Profile(ID, C); +} |
