clang  5.0.0
ExternalASTMerger.h
Go to the documentation of this file.
1 //===--- ExternalASTMerger.h - Merging External AST Interface ---*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file declares the ExternalASTMerger, which vends a combination of ASTs
11 // from several different ASTContext/FileManager pairs
12 //
13 //===----------------------------------------------------------------------===//
14 #ifndef LLVM_CLANG_AST_EXTERNALASTMERGER_H
15 #define LLVM_CLANG_AST_EXTERNALASTMERGER_H
16 
17 #include "clang/AST/ASTImporter.h"
19 
20 namespace clang {
21 
23 public:
24  struct ImporterPair {
25  std::unique_ptr<ASTImporter> Forward;
26  std::unique_ptr<ASTImporter> Reverse;
27  };
28 
29 private:
30  std::vector<ImporterPair> Importers;
31 
32 public:
36  };
37  ExternalASTMerger(const ImporterEndpoint &Target,
39 
41  DeclarationName Name) override;
42 
43  void
45  llvm::function_ref<bool(Decl::Kind)> IsKindWeWant,
47 };
48 
49 } // end namespace clang
50 
51 #endif
Implements support for file system lookup, file system caching, and directory search management...
Definition: FileManager.h:116
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
Definition: ASTContext.h:128
std::unique_ptr< ASTImporter > Forward
bool FindExternalVisibleDeclsByName(const DeclContext *DC, DeclarationName Name) override
Find all declarations with the given name in the given context, and add them to the context by callin...
The result type of a method or function.
Abstract interface for external sources of AST nodes.
void FindExternalLexicalDecls(const DeclContext *DC, llvm::function_ref< bool(Decl::Kind)> IsKindWeWant, SmallVectorImpl< Decl * > &Result) override
Finds all declarations lexically contained within the given DeclContext, after applying an optional f...
DeclContext - This is used only as base class of specific decl types that can act as declaration cont...
Definition: DeclBase.h:1215
StringRef Name
Definition: USRFinder.cpp:123
DeclarationName - The name of a declaration.
ExternalASTMerger(const ImporterEndpoint &Target, llvm::ArrayRef< ImporterEndpoint > Sources)
Kind
Lists the kind of concrete classes of Decl.
Definition: DeclBase.h:84
std::unique_ptr< ASTImporter > Reverse