clang-tools 20.0.0git
|
Handles PPCallbacks and re-runs preprocessing of the whole translation unit with modules disabled. More...
#include <ExpandModularHeadersPPCallbacks.h>
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. | |
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.
clang::tooling::ExpandModularHeadersPPCallbacks::ExpandModularHeadersPPCallbacks | ( | CompilerInstance * | CI, |
IntrusiveRefCntPtr< llvm::vfs::OverlayFileSystem > | OverlayFS | ||
) |
Definition at line 67 of file ExpandModularHeadersPPCallbacks.cpp.
|
default |
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.