A Clang front-end action that performs a source-to-source transformation, replacing generic type names within function names and Vuo type annotations with the corresponding specialized type names.
Definition at line 21 of file VuoReplaceGenericTypesWithSpecializedAction.hh.
Public Member Functions | |
VuoReplaceGenericTypesWithSpecializedAction (raw_ostream &output, const map< string, string > &replacements, bool shouldReplaceGenericTypesInVuoTypeAnnotations, json_object *specializedModuleDetails, unique_ptr< VuoPreprocessorCallbacks > preprocessorCallbacks) | |
Constructs a Clang front-end action that is ready to be executed. | |
unique_ptr< clang::ASTConsumer > | CreateASTConsumer (clang::CompilerInstance &compilerInstance, llvm::StringRef inFile) |
Boilerplate needed by Clang. | |
bool | BeginSourceFileAction (clang::CompilerInstance &CI) |
Transfers preprocessorCallbacks to Clang's preprocessor. | |
void | EndSourceFileAction () |
Writes the transformed source code to output . | |
VuoReplaceGenericTypesWithSpecializedAction::VuoReplaceGenericTypesWithSpecializedAction | ( | raw_ostream & | output, |
const map< string, string > & | replacements, | ||
bool | shouldReplaceGenericTypesInVuoTypeAnnotations, | ||
json_object * | specializedModuleDetails, | ||
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. |
replacements | For each generic type name, the specialized type name that should be substituted in its place. |
shouldReplaceGenericTypesInVuoTypeAnnotations | If false, Vuo type annotations will not be modified. |
specializedModuleDetails | Module metadata that should be added to the metadata already in the source code. |
preprocessorCallbacks | Callbacks for handling include directives. |
Definition at line 26 of file VuoReplaceGenericTypesWithSpecializedAction.cc.
bool VuoReplaceGenericTypesWithSpecializedAction::BeginSourceFileAction | ( | clang::CompilerInstance & | CI | ) |
Transfers preprocessorCallbacks
to Clang's preprocessor.
Definition at line 52 of file VuoReplaceGenericTypesWithSpecializedAction.cc.
unique_ptr< ASTConsumer > VuoReplaceGenericTypesWithSpecializedAction::CreateASTConsumer | ( | clang::CompilerInstance & | compilerInstance, |
llvm::StringRef | inFile | ||
) |
Boilerplate needed by Clang.
Definition at line 43 of file VuoReplaceGenericTypesWithSpecializedAction.cc.
void VuoReplaceGenericTypesWithSpecializedAction::EndSourceFileAction | ( | ) |
Writes the transformed source code to output
.
Definition at line 61 of file VuoReplaceGenericTypesWithSpecializedAction.cc.