diff options
Diffstat (limited to 'clang/lib/AST')
| -rw-r--r-- | clang/lib/AST/ExternalASTSource.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/clang/lib/AST/ExternalASTSource.cpp b/clang/lib/AST/ExternalASTSource.cpp index 8d32dd23bbe..f3b15fc58c8 100644 --- a/clang/lib/AST/ExternalASTSource.cpp +++ b/clang/lib/AST/ExternalASTSource.cpp @@ -29,13 +29,20 @@ ExternalASTSource::getSourceDescriptor(unsigned ID) { } ExternalASTSource::ASTSourceDescriptor::ASTSourceDescriptor(const Module &M) - : FullModuleName(M.getFullModuleName()), Signature(M.Signature) { + : Signature(M.Signature), ClangModule(&M) { if (M.Directory) Path = M.Directory->getName(); if (auto *File = M.getASTFile()) ASTFile = File->getName(); } +std::string ExternalASTSource::ASTSourceDescriptor::getFullModuleName() const { + if (ClangModule) + return ClangModule->getFullModuleName(); + else + return PCHModuleName; +} + void ExternalASTSource::FindFileRegionDecls(FileID File, unsigned Offset, unsigned Length, SmallVectorImpl<Decl *> &Decls) {} |

