clang  14.0.0git
Public Member Functions | Public Attributes | List of all members
clang::tooling::dependencies::FullDependencies Struct Reference

The full dependencies and module graph for a specific input. More...

#include "clang/Tooling/DependencyScanning/DependencyScanningTool.h"

Collaboration diagram for clang::tooling::dependencies::FullDependencies:
Collaboration graph
[legend]

Public Member Functions

std::vector< std::stringgetAdditionalArgs (std::function< StringRef(ModuleID)> LookupPCMPath, std::function< const ModuleDeps &(ModuleID)> LookupModuleDeps) const
 Get additional arguments suitable for appending to the original Clang command line. More...
 
std::vector< std::stringgetAdditionalArgsWithoutModulePaths () const
 Get additional arguments suitable for appending to the original Clang command line, excluding arguments containing modules-related paths: "-fmodule-file=", "-fmodule-map-file=". More...
 

Public Attributes

ModuleID ID
 The identifier of the C++20 module this translation unit exports. More...
 
std::vector< std::stringFileDeps
 A collection of absolute paths to files that this translation unit directly depends on, not including transitive dependencies. More...
 
std::vector< PrebuiltModuleDepPrebuiltModuleDeps
 A collection of prebuilt modules this translation unit directly depends on, not including transitive dependencies. More...
 
std::vector< ModuleIDClangModuleDeps
 A list of modules this translation unit directly depends on, not including transitive dependencies. More...
 

Detailed Description

The full dependencies and module graph for a specific input.

Definition at line 24 of file DependencyScanningTool.h.

Member Function Documentation

◆ getAdditionalArgs()

std::vector< std::string > clang::tooling::dependencies::FullDependencies::getAdditionalArgs ( std::function< StringRef(ModuleID)>  LookupPCMPath,
std::function< const ModuleDeps &(ModuleID)>  LookupModuleDeps 
) const

Get additional arguments suitable for appending to the original Clang command line.

Parameters
LookupPCMPathThis function is called to fill in "-fmodule-file=" arguments and the "-o" argument. It needs to return a path for where the PCM for the given module is to be located.
LookupModuleDepsThis function is called to collect the full transitive set of dependencies for this compilation and fill in "-fmodule-map-file=" arguments.

Definition at line 16 of file DependencyScanningTool.cpp.

References ClangModuleDeps, clang::tooling::dependencies::detail::collectPCMAndModuleMapPaths(), getAdditionalArgsWithoutModulePaths(), Ret(), and string().

◆ getAdditionalArgsWithoutModulePaths()

std::vector< std::string > clang::tooling::dependencies::FullDependencies::getAdditionalArgsWithoutModulePaths ( ) const

Get additional arguments suitable for appending to the original Clang command line, excluding arguments containing modules-related paths: "-fmodule-file=", "-fmodule-map-file=".

Definition at line 32 of file DependencyScanningTool.cpp.

References PrebuiltModuleDeps.

Referenced by getAdditionalArgs().

Member Data Documentation

◆ ClangModuleDeps

std::vector<ModuleID> clang::tooling::dependencies::FullDependencies::ClangModuleDeps

A list of modules this translation unit directly depends on, not including transitive dependencies.

This may include modules with a different context hash when it can be determined that the differences are benign for this compilation.

Definition at line 43 of file DependencyScanningTool.h.

Referenced by getAdditionalArgs(), and clang::tooling::dependencies::DependencyScanningTool::getFullDependencies().

◆ FileDeps

std::vector<std::string> clang::tooling::dependencies::FullDependencies::FileDeps

A collection of absolute paths to files that this translation unit directly depends on, not including transitive dependencies.

Definition at line 32 of file DependencyScanningTool.h.

Referenced by clang::tooling::dependencies::DependencyScanningTool::getFullDependencies().

◆ ID

ModuleID clang::tooling::dependencies::FullDependencies::ID

The identifier of the C++20 module this translation unit exports.

If the translation unit is not a module then ID.ModuleName is empty.

Definition at line 28 of file DependencyScanningTool.h.

Referenced by clang::tooling::dependencies::DependencyScanningTool::getFullDependencies().

◆ PrebuiltModuleDeps

std::vector<PrebuiltModuleDep> clang::tooling::dependencies::FullDependencies::PrebuiltModuleDeps

A collection of prebuilt modules this translation unit directly depends on, not including transitive dependencies.

Definition at line 36 of file DependencyScanningTool.h.

Referenced by getAdditionalArgsWithoutModulePaths(), and clang::tooling::dependencies::DependencyScanningTool::getFullDependencies().


The documentation for this struct was generated from the following files: