Vuo 2.4.4
Loading...
Searching...
No Matches
Classes | Public Member Functions | List of all members
VuoReplaceGenericTypesWithSpecializedAction Class Reference

Description

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.
 

Constructor & Destructor Documentation

◆ VuoReplaceGenericTypesWithSpecializedAction()

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.

Parameters
outputThe stream to which the transformed source code will be written.
replacementsFor each generic type name, the specialized type name that should be substituted in its place.
shouldReplaceGenericTypesInVuoTypeAnnotationsIf false, Vuo type annotations will not be modified.
specializedModuleDetailsModule metadata that should be added to the metadata already in the source code.
preprocessorCallbacksCallbacks for handling include directives.

Definition at line 26 of file VuoReplaceGenericTypesWithSpecializedAction.cc.

Member Function Documentation

◆ BeginSourceFileAction()

bool VuoReplaceGenericTypesWithSpecializedAction::BeginSourceFileAction ( clang::CompilerInstance &  CI)

Transfers preprocessorCallbacks to Clang's preprocessor.

Definition at line 52 of file VuoReplaceGenericTypesWithSpecializedAction.cc.

◆ CreateASTConsumer()

unique_ptr< ASTConsumer > VuoReplaceGenericTypesWithSpecializedAction::CreateASTConsumer ( clang::CompilerInstance &  compilerInstance,
llvm::StringRef  inFile 
)

Boilerplate needed by Clang.

Definition at line 43 of file VuoReplaceGenericTypesWithSpecializedAction.cc.

◆ EndSourceFileAction()

void VuoReplaceGenericTypesWithSpecializedAction::EndSourceFileAction ( )

Writes the transformed source code to output.

Definition at line 61 of file VuoReplaceGenericTypesWithSpecializedAction.cc.


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