#include "clang/AST/ASTContext.h"
#include "clang/AST/Decl.h"
#include "clang/AST/DeclCXX.h"
#include "clang/AST/DeclObjC.h"
#include "clang/AST/DeclTemplate.h"
#include "clang/AST/ExternalASTMerger.h"
usingnamespaceclang;
namespace {
template <typename T> struct Source { … };
Candidate;
const DeclContext *CanonicalizeDC(const DeclContext *DC) { … }
Source<const DeclContext *>
LookupSameContext(Source<TranslationUnitDecl *> SourceTU, const DeclContext *DC,
ASTImporter &ReverseImporter) { … }
class LazyASTImporter : public ASTImporter { … };
bool HasDeclOfSameType(llvm::ArrayRef<Candidate> Decls, const Candidate &C) { … }
}
ASTImporter &ExternalASTMerger::ImporterForOrigin(ASTContext &OriginContext) { … }
namespace {
LazyASTImporter &LazyImporterForOrigin(ExternalASTMerger &Merger,
ASTContext &OriginContext) { … }
}
bool ExternalASTMerger::HasImporterForOrigin(ASTContext &OriginContext) { … }
template <typename CallbackType>
void ExternalASTMerger::ForEachMatchingDC(const DeclContext *DC,
CallbackType Callback) { … }
void ExternalASTMerger::CompleteType(TagDecl *Tag) { … }
void ExternalASTMerger::CompleteType(ObjCInterfaceDecl *Interface) { … }
bool ExternalASTMerger::CanComplete(DeclContext *Interface) { … }
namespace {
bool IsSameDC(const DeclContext *D1, const DeclContext *D2) { … }
}
void ExternalASTMerger::MaybeRecordOrigin(const DeclContext *ToDC,
DCOrigin Origin) { … }
void ExternalASTMerger::ForceRecordOrigin(const DeclContext *ToDC,
DCOrigin Origin) { … }
void ExternalASTMerger::RecordOriginImpl(const DeclContext *ToDC, DCOrigin Origin,
ASTImporter &Importer) { … }
ExternalASTMerger::ExternalASTMerger(const ImporterTarget &Target,
llvm::ArrayRef<ImporterSource> Sources) : … { … }
Decl *ExternalASTMerger::FindOriginalDecl(Decl *D) { … }
void ExternalASTMerger::AddSources(llvm::ArrayRef<ImporterSource> Sources) { … }
void ExternalASTMerger::RemoveSources(llvm::ArrayRef<ImporterSource> Sources) { … }
template <typename DeclTy>
static bool importSpecializations(DeclTy *D, ASTImporter *Importer) { … }
static bool importSpecializationsIfNeeded(Decl *D, ASTImporter *Importer) { … }
bool ExternalASTMerger::FindExternalVisibleDeclsByName(const DeclContext *DC,
DeclarationName Name) { … }
void ExternalASTMerger::FindExternalLexicalDecls(
const DeclContext *DC, llvm::function_ref<bool(Decl::Kind)> IsKindWeWant,
SmallVectorImpl<Decl *> &Result) { … }