A Clang front-end action that runs source code through Clang's preprocessor.
Unlike PrintPreprocessedAction, this class writes its output to a stream provided by the caller.
Definition at line 20 of file VuoPreprocessAction.hh.
Public Member Functions | |
VuoPreprocessAction (raw_ostream &output, unique_ptr< VuoPreprocessorCallbacks > preprocessorCallbacks) | |
Constructs a Clang front-end action that is ready to be executed. | |
bool | BeginSourceFileAction (clang::CompilerInstance &CI) |
Transfers preprocessorCallbacks to Clang's preprocessor. | |
void | ExecuteAction () |
Preprocesses the source code and writes the result to the output stream. | |
VuoPreprocessAction::VuoPreprocessAction | ( | raw_ostream & | output, |
unique_ptr< VuoPreprocessorCallbacks > | preprocessorCallbacks | ||
) |
Constructs a Clang front-end action that is ready to be executed.
output | The stream to which the transformed source code will be written. |
preprocessorCallbacks | The set of callbacks for Clang to call while preprocessing the source code. |
Definition at line 21 of file VuoPreprocessAction.cc.
bool VuoPreprocessAction::BeginSourceFileAction | ( | clang::CompilerInstance & | CI | ) |
Transfers preprocessorCallbacks
to Clang's preprocessor.
Definition at line 31 of file VuoPreprocessAction.cc.
void VuoPreprocessAction::ExecuteAction | ( | ) |
Preprocesses the source code and writes the result to the output stream.
Definition at line 40 of file VuoPreprocessAction.cc.