clang 8.0.0

Public Member Functions | Static Public Member Functions | List of all members
clang::DependencyFileGenerator Class Reference

Builds a depdenency file when attached to a Preprocessor (for includes) and ASTReader (for module imports), and writes it out at the end of processing a source file. More...

`#include "clang/Frontend/Utils.h"`

## Public Member Functions
void | AttachToASTReader (ASTReader &R)

## Static Public Member Functions
static DependencyFileGenerator * | CreateAndAttachToPreprocessor (Preprocessor &PP, const DependencyOutputOptions &Opts)

## Detailed Description

Builds a depdenency file when attached to a Preprocessor (for includes) and ASTReader (for module imports), and writes it out at the end of processing a source file.

Users should attach to the ast reader whenever a module is loaded.

Definition at line 119 of file Utils.h.

## Member Function Documentation

## ◆ AttachToASTReader()

void DependencyFileGenerator::AttachToASTReader | ( | ASTReader & | R | ) |

Definition at line 264 of file DependencyFile.cpp.

References clang::ASTReader::addListener(), clang::PPCallbacks::EnterFile, clang::SourceManager::getExpansionLoc(), clang::SourceManager::getFileEntryForID(), clang::SourceManager::getFileID(), clang::FileEntry::getName(), isSpecialFilename(), and clang::SrcMgr::isSystem().

Referenced by clang::CompilerInstance::createPCHExternalASTSource().

## ◆ CreateAndAttachToPreprocessor()

DependencyFileGenerator * DependencyFileGenerator::CreateAndAttachToPreprocessor | ( | clang::Preprocessor & | PP,
|  | const DependencyOutputOptions & | Opts
| ) |  |
| static

Definition at line 245 of file DependencyFile.cpp.

References clang::DependencyOutputOptions::AddMissingHeaderDeps, clang::Preprocessor::getDiagnostics(), clang::DiagnosticsEngine::Report(), clang::Preprocessor::SetSuppressIncludeNotFoundError(), and clang::DependencyOutputOptions::Targets.

Referenced by clang::CompilerInstance::createPreprocessor().

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

- include/clang/Frontend/Utils.h
- lib/Frontend/DependencyFile.cpp