clang-tools 20.0.0git
Classes | Public Member Functions | List of all members
clang::tooling::ExpandModularHeadersPPCallbacks Class Reference

Handles PPCallbacks and re-runs preprocessing of the whole translation unit with modules disabled. More...

#include <ExpandModularHeadersPPCallbacks.h>

Inheritance diagram for clang::tooling::ExpandModularHeadersPPCallbacks:
Inheritance graph
[legend]

Classes

class  FileRecorder
 

Public Member Functions

 ExpandModularHeadersPPCallbacks (CompilerInstance *CI, IntrusiveRefCntPtr< llvm::vfs::OverlayFileSystem > OverlayFS)
 
 ~ExpandModularHeadersPPCallbacks ()
 
Preprocessor * getPreprocessor () const
 Returns the preprocessor that provides callbacks for the whole translation unit, including the main file, textual headers, and modular headers.
 

Detailed Description

Handles PPCallbacks and re-runs preprocessing of the whole translation unit with modules disabled.

This way it's possible to get PPCallbacks for the whole translation unit including the contents of the modular headers and all their transitive includes.

This allows existing tools based on PPCallbacks to retain their functionality when running with C++ modules enabled. This only works in the backwards compatible modules mode, i.e. when code can still be parsed in non-modular way.

Definition at line 41 of file ExpandModularHeadersPPCallbacks.h.

Constructor & Destructor Documentation

◆ ExpandModularHeadersPPCallbacks()

clang::tooling::ExpandModularHeadersPPCallbacks::ExpandModularHeadersPPCallbacks ( CompilerInstance *  CI,
IntrusiveRefCntPtr< llvm::vfs::OverlayFileSystem >  OverlayFS 
)

Definition at line 67 of file ExpandModularHeadersPPCallbacks.cpp.

◆ ~ExpandModularHeadersPPCallbacks()

clang::tooling::ExpandModularHeadersPPCallbacks::~ExpandModularHeadersPPCallbacks ( )
default

Member Function Documentation

◆ getPreprocessor()

Preprocessor * clang::tooling::ExpandModularHeadersPPCallbacks::getPreprocessor ( ) const

Returns the preprocessor that provides callbacks for the whole translation unit, including the main file, textual headers, and modular headers.

This preprocessor is separate from the one used by the rest of the compiler.

Definition at line 110 of file ExpandModularHeadersPPCallbacks.cpp.


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