fixupStorageAccessOfForwardTemplateDeclarations
Fixup the storage access of all compiler‐generated forward declarations (non‐defining declarations) to match that of the defining declaration.
Synopsis
Declared in <SageIII/astFixup/fixupStorageAccessOfForwardTemplateDeclarations.h>
void
fixupStorageAccessOfForwardTemplateDeclarations(SgNode* node);
Description
This fix is required because legacy frontend builds forward declarations for template instantations but does not mark the forward declaration as static when using the instantiation mode "local" ("‐‐instantiation local"). The defining declaration is correctly marked as static. This fixup only applies to compiler generated forward declarations (placed after the template declaration) and having a valid defining declaration.
This is a bug in legacy frontend, which I suppose we should
report. We need this because need to instantiate templates (ROSE puts them
out as specializations) but we want them to appear only locally, since the
prelink mechanism is still not yet working well enogh to rely on it. Only
transformed templates are output, but such template instatiations would be
redundently put out in each file where they were used.
Parameters
Name |
Description |
node |
This class represents the base class for all IR nodes within Sage III. |
Created with MrDocs