clang  10.0.0svn
Classes | Namespaces | Enumerations | Functions
DependencyDirectivesSourceMinimizer.h File Reference

This is the interface for minimizing header and source files to the minimum necessary preprocessor directives for evaluating includes. More...

#include "clang/Basic/SourceLocation.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringRef.h"
Include dependency graph for DependencyDirectivesSourceMinimizer.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  clang::minimize_source_to_dependency_directives::Token
 Represents a simplified token that's lexed as part of the source minimization. More...
 
struct  clang::minimize_source_to_dependency_directives::SkippedRange
 Simplified token range to track the range of a potentially skippable PP directive. More...
 

Namespaces

 clang
 Dataflow Directional Tag Classes.
 
 clang::minimize_source_to_dependency_directives
 

Enumerations

enum  clang::minimize_source_to_dependency_directives::TokenKind {
  clang::minimize_source_to_dependency_directives::pp_none, clang::minimize_source_to_dependency_directives::pp_include, clang::minimize_source_to_dependency_directives::pp___include_macros, clang::minimize_source_to_dependency_directives::pp_define,
  clang::minimize_source_to_dependency_directives::pp_undef, clang::minimize_source_to_dependency_directives::pp_import, clang::minimize_source_to_dependency_directives::pp_pragma_import, clang::minimize_source_to_dependency_directives::pp_pragma_once,
  clang::minimize_source_to_dependency_directives::pp_include_next, clang::minimize_source_to_dependency_directives::pp_if, clang::minimize_source_to_dependency_directives::pp_ifdef, clang::minimize_source_to_dependency_directives::pp_ifndef,
  clang::minimize_source_to_dependency_directives::pp_elif, clang::minimize_source_to_dependency_directives::pp_else, clang::minimize_source_to_dependency_directives::pp_endif, clang::minimize_source_to_dependency_directives::decl_at_import,
  clang::minimize_source_to_dependency_directives::cxx_export_decl, clang::minimize_source_to_dependency_directives::cxx_module_decl, clang::minimize_source_to_dependency_directives::cxx_import_decl, clang::minimize_source_to_dependency_directives::pp_eof
}
 Represents the kind of preprocessor directive or a module declaration that is tracked by the source minimizer in its token output. More...
 

Functions

bool clang::minimize_source_to_dependency_directives::computeSkippedRanges (ArrayRef< Token > Input, llvm::SmallVectorImpl< SkippedRange > &Range)
 Computes the potential source ranges that can be skipped by the preprocessor when skipping a directive like if, #ifdef or #elsif. More...
 
bool clang::minimizeSourceToDependencyDirectives (llvm::StringRef Input, llvm::SmallVectorImpl< char > &Output, llvm::SmallVectorImpl< minimize_source_to_dependency_directives::Token > &Tokens, DiagnosticsEngine *Diags=nullptr, SourceLocation InputSourceLoc=SourceLocation())
 Minimize the input down to the preprocessor directives that might have an effect on the dependencies for a compilation unit. More...
 

Detailed Description

This is the interface for minimizing header and source files to the minimum necessary preprocessor directives for evaluating includes.

It reduces the source down to #define, #include, #import, , and any conditional preprocessor logic that contains one of those.

Definition in file DependencyDirectivesSourceMinimizer.h.