summaryrefslogtreecommitdiffstats
path: root/include/clang/AST/ExternalASTSource.h
diff options
context:
space:
mode:
authorAdrian Prantl <aprantl@apple.com>2015-06-30 17:39:43 +0000
committerAdrian Prantl <aprantl@apple.com>2015-06-30 17:39:43 +0000
commit42a7206deb117a1afcd279f047d1e06fde1bb105 (patch)
tree0718d5d7d224aa99989f0d38c9ebf1bf409516e7 /include/clang/AST/ExternalASTSource.h
parent11fd95dc829c969286da2082e4506f10a7363588 (diff)
Add a function to ExternalASTSource that returns a descriptor that
abstracts the commonalities between modules and PCH files that are needed to emit debug info for a module or precompiled header. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241083 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/AST/ExternalASTSource.h')
-rw-r--r--include/clang/AST/ExternalASTSource.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/clang/AST/ExternalASTSource.h b/include/clang/AST/ExternalASTSource.h
index 9a76080762..08c2e0cf26 100644
--- a/include/clang/AST/ExternalASTSource.h
+++ b/include/clang/AST/ExternalASTSource.h
@@ -156,6 +156,20 @@ public:
/// \brief Retrieve the module that corresponds to the given module ID.
virtual Module *getModule(unsigned ID) { return nullptr; }
+ /// \brief Holds everything needed to generate debug info for an
+ /// imported module or precompiled header file.
+ struct ASTSourceDescriptor {
+ std::string ModuleName;
+ std::string Path;
+ std::string ASTFile;
+ uint64_t Signature;
+ };
+
+ /// \brief Return a descriptor for the corresponding module, if one exists.
+ virtual llvm::Optional<ASTSourceDescriptor> getSourceDescriptor(unsigned ID);
+ /// \brief Return a descriptor for the module.
+ virtual ASTSourceDescriptor getSourceDescriptor(const Module &M);
+
/// \brief Finds all declarations lexically contained within the given
/// DeclContext, after applying an optional filter predicate.
///