clang 20.0.0git
ASTSourceDescriptor.cpp
Go to the documentation of this file.
1//===- ASTSourceDescriptor.cpp -------------------------------------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9/// Defines the clang::ASTSourceDescriptor class, which abstracts clang modules
10/// and precompiled header files
11//
12//===----------------------------------------------------------------------===//
13
15
16namespace clang {
17
19 : Signature(M.Signature), ClangModule(&M) {
20 if (M.Directory)
21 Path = M.Directory->getName();
22 if (auto File = M.getASTFile())
23 ASTFile = File->getName();
24}
25
27 if (ClangModule)
28 return ClangModule->Name;
29 else
30 return std::string(PCHModuleName);
31}
32
33} // namespace clang
Defines the clang::ASTSourceDescriptor class, which abstracts clang modules and precompiled header fi...
std::string getModuleName() const
StringRef getName() const
Describes a module or submodule.
Definition: Module.h:105
std::string Name
The name of this module.
Definition: Module.h:108
OptionalDirectoryEntryRef Directory
The build directory of this module.
Definition: Module.h:159
OptionalFileEntryRef getASTFile() const
The serialized AST file for this module, if one was created.
Definition: Module.h:681
The JSON file list parser is used to communicate input to InstallAPI.