markAsCompilerGenerated
Mark an AST subtree as compiler generated (used for instatiated templates generated by ROSE as specializations).
Synopsis
Declared in <SageIII/astPostProcessing/markCompilerGenerated.h>
void
markAsCompilerGenerated(SgNode* node);
Description
Template instatiation is handled by ROSE and legacy frontend though the translation of instatiations to be template specializations. When output as specializations they are generated code (not appearing in the original source code). Since legacy frontend recordes the position of the instatiated template as the location of the original template declaration (which could be in a different file) the unparser can skip over the output of such parts of the AST (since we only output the code associated with the original source file as a way of stripping off all the headers files that would otherwise be prepended to the source code).
Note that it sould not be sufficient to mark the generated
template specializations as transformations since then all template
specializations wuld be output (only user transformed template
specializations should be output).
Parameters
Name |
Description |
node |
This class represents the base class for all IR nodes within Sage III. |
Created with MrDocs