#include <Cxx_Grammar.h>
Inheritance diagram for SgProject:


This IR nodes contains list of files, etc. after internal command-line processing. The original argc and argv are not modified and left in tact for processing by the ROSE translator. The SgProject node keeps a deep copy of the original argc and argv as an STL list of strings (representing the command-line arguments). Also, if ROSE and/or EDG specific command-line options are not wanted in the ROSE translator, they may be stripped from argc and argv, using the member functions:
For internal use only.
This IR node does not appear many times in an AST (typically only once).
Public Types | |
| e_unknown = 0 | |
| e_default = 1 | |
| e_none = 2 | |
| e_used = 3 | |
| e_all = 4 | |
| e_local = 5 | |
| e_last | |
| enum | template_instantiation_enum { e_unknown = 0, e_default = 1, e_none = 2, e_used = 3, e_all = 4, e_local = 5, e_last } |
Public Member Functions | |
| virtual SgNode * | copy (SgCopyHelp &help) const |
| SgProject (const std::vector< std::string > &argv) | |
| The only useful constructors. | |
| SgProject (int argc, char **argv) | |
| void | processCommandLine (const std::vector< std::string > &argv) |
| process command line and store options in the SgProject object. This options are used by parse und unparse. | |
| void | processCommandLine (int argc, char **argv) |
| int | parse () |
| parse input file(s) | |
| int | parse (const std::vector< std::string > &argv) |
| processes command line and parses all files. | |
| int | parse (int argc, char **argv) |
| SgProject () | |
| default constructor (not meant to be used) | |
| SgProject (const SgProject &project) | |
| Copy constructor (shallow copy, does not do deep copy of the AST). | |
| int | numberOfFiles () const |
| The total number of files in this project (equal to the number of source files specified on the command line). | |
| int | numberOfDirectories () const |
| Total number of directories in the project. | |
| SgFile & | get_file (int i) const ROSE_DEPRECATED_FUNCTION |
| Access function for retriving a SgFile object from the list stored internally This function is depricated and "operator[unsigned int]" should be used instead. | |
| void | set_file (SgFile &file) ROSE_DEPRECATED_FUNCTION |
| Access function for putting a new SgFile object into the list stored internally This function is depricated and "get_fileList->push_back(SgFile*)" should be used instead. | |
| SgFile * | operator[] (unsigned int i) |
| Access function for retriving a SgFile object from the list stored internally. | |
| void | unparse (UnparseFormatHelp *unparseFormatHelp=NULL, UnparseDelegate *unparseDelegate=NULL) |
| function to generate output for all files in the project (arguments control code generation) | |
| int | compileOutput (const std::string &compilerName=BACKEND_CXX_COMPILER_NAME_WITH_PATH) |
| function to compile the output from unparsing the project | |
| int | link (std::string linkerName=BACKEND_CXX_COMPILER_NAME_WITH_PATH) |
| function to preform linking! | |
| int | link (const std::vector< std::string > &argv, std::string linkerName=BACKEND_CXX_COMPILER_NAME_WITH_PATH) |
| function to preform linking! | |
| Rose_STL_Container< std::string > | getAbsolutePathFileNames () const |
| This function generates a list of files resolved to absolute paths (symbolic links should not be resolved). | |
| bool | get_skip_transformation (void) const |
| bool | get_skip_unparse (void) const |
| bool | get_useBackendOnly (void) const |
| bool | get_C_only (void) const |
| bool | get_C99_only (void) const |
| This controls the c99 mode in the frontend. | |
| bool | get_Cxx_only (void) const |
| bool | get_Fortran_only (void) const |
| bool | get_F77_only (void) const |
| bool | get_F90_only (void) const |
| bool | get_F95_only (void) const |
| bool | get_F2003_only (void) const |
| bool | get_CoArrayFortran_only (void) const |
| bool | get_PHP_only (void) const |
| void | display (const std::string &label) const |
| void | initialization () |
| virtual void | fixupCopy (SgNode *copy, SgCopyHelp &help) const |
| void | skipfinalCompileStep (bool value) |
| SgStringList & | get_includePathList () |
| const SgStringList & | get_includePathList () const |
| void | set_includePathList (const SgStringList &includePathList) |
| SgStringList & | get_excludePathList () |
| const SgStringList & | get_excludePathList () const |
| void | set_excludePathList (const SgStringList &excludePathList) |
| SgStringList & | get_includeFileList () |
| const SgStringList & | get_includeFileList () const |
| void | set_includeFileList (const SgStringList &includeFileList) |
| SgStringList & | get_excludeFileList () |
| const SgStringList & | get_excludeFileList () const |
| void | set_excludeFileList (const SgStringList &excludeFileList) |
| SgFilePtrList & | get_fileList () const |
| void | set_fileList (SgFilePtrList &fileList) |
| virtual void | addNewAttribute (std::string s, AstAttribute *a) |
| Add a new attribute represented by the named string. | |
| virtual AstAttribute * | getAttribute (std::string s) const |
| Returns attribute of name 's'. | |
| virtual void | updateAttribute (std::string s, AstAttribute *a) |
| Replace existing attribute of name 's' with new AstAttribute. | |
| virtual void | setAttribute (std::string s, AstAttribute *a) |
| This is a wrapper function with the following semantics: if no attribute of name 's' exists then addNewAttribute(s,a); is called, otherwise updateAttribute(s,a); is called. | |
| virtual void | removeAttribute (std::string s) |
| Remove attribute of name 's' if present. | |
| virtual bool | attributeExists (std::string s) const |
| Tests if attribute of name 's' is present. | |
| virtual int | numberOfAttributes () const |
| Returns the number of attributes on this IR node. | |
| virtual std::string | class_name () const |
| Copies AST (whole subtree, depending on the SgCopyHelp class returns a string representing the class name. | |
| virtual VariantT | variantT () const |
| returns new style SageIII enum values | |
| void * | operator new (size_t size) |
| returns pointer to newly allocated IR node | |
| void | operator delete (void *pointer, size_t size) |
| deallocated memory for IR node (returns memory to memory pool for reuse) | |
| void | operator delete (void *pointer) |
| virtual std::vector< SgNode * > | get_traversalSuccessorContainer () |
| FOR INTERNAL USE within ROSE traverals mechanism only. | |
| virtual std::vector< std::string > | get_traversalSuccessorNamesContainer () |
| FOR INTERNAL USE within ROSE traverals mechanism only. | |
| virtual size_t | get_numberOfTraversalSuccessors () |
| virtual SgNode * | get_traversalSuccessorByIndex (size_t idx) |
| virtual size_t | get_childIndex (SgNode *child) |
| virtual RTIReturnType | roseRTI () |
| FOR INTERNAL USE Access to Runtime Type Information (RTI) for this IR nodes. | |
| virtual const char * | sage_class_name () const ROSE_DEPRECATED_FUNCTION |
| void | executeVisitorMemberFunction (ROSE_VisitorPattern &visitor) |
| FOR INTERNAL USE Support for visitor pattern. | |
| virtual bool | isInMemoryPool () |
| FOR INTERNAL USE This is used in internal tests to verify that all IR nodes are allocated from the heap. | |
| virtual void | checkDataMemberPointersIfInMemoryPool () |
| FOR INTERNAL USE This is used in internal tests to verify that all IR nodes are allocated from the heap. | |
| virtual std::vector< std::pair< SgNode *, std::string > > | returnDataMemberPointers () const |
| FOR INTERNAL USE Returns STL vector of pairs of SgNode* and strings for use in AST tools | |
| virtual void | processDataMemberReferenceToPointers (ReferenceToPointerHandler *) |
| FOR INTERNAL USE Processes pairs of references to SgNode* and strings for use in AST tools | |
| virtual long | getChildIndex (SgNode *childNode) const |
| FOR INTERNAL USE Returns a unique index value for the childNode in the list of children at this IR node. | |
| SgProject (const SgProjectStorageClass &source) | |
| SgProject * | addRegExpAttribute (std::string s, AstRegExAttribute *a) |
| Support for AST matching using regular expression. | |
| SgFileList * | get_fileList_ptr () const |
| void | set_fileList_ptr (SgFileList *fileList_ptr) |
| SgStringList | get_originalCommandLineArgumentList () const |
| Returns a list of strings representing the original command-line. | |
| void | set_originalCommandLineArgumentList (SgStringList originalCommandLineArgumentList) |
| int | get_frontendErrorCode () const |
| void | set_frontendErrorCode (int frontendErrorCode) |
| int | get_backendErrorCode () const |
| void | set_backendErrorCode (int backendErrorCode) |
| std::string | get_outputFileName () const |
| void | set_outputFileName (std::string outputFileName) |
| const SgStringList & | get_sourceFileNameList () const |
| SgStringList & | get_sourceFileNameList () |
| const SgStringList & | get_objectFileNameList () const |
| SgStringList & | get_objectFileNameList () |
| const SgStringList & | get_libraryFileList () const |
| SgStringList & | get_libraryFileList () |
| const SgStringList & | get_librarySpecifierList () const |
| SgStringList & | get_librarySpecifierList () |
| const SgStringList & | get_libraryDirectorySpecifierList () const |
| SgStringList & | get_libraryDirectorySpecifierList () |
| const SgStringList & | get_includeDirectorySpecifierList () const |
| SgStringList & | get_includeDirectorySpecifierList () |
| const SgStringList & | get_preincludeFileList () const |
| SgStringList & | get_preincludeFileList () |
| const SgStringList & | get_preincludeDirectoryList () const |
| SgStringList & | get_preincludeDirectoryList () |
| bool | get_compileOnly () const |
| void | set_compileOnly (bool compileOnly) |
| bool | get_wave () const |
| void | set_wave (bool wave) |
| bool | get_prelink () const |
| void | set_prelink (bool prelink) |
| SgProject::template_instantiation_enum | get_template_instantiation_mode () const |
| void | set_template_instantiation_mode (SgProject::template_instantiation_enum template_instantiation_mode) |
| bool | get_astMerge () const |
| void | set_astMerge (bool astMerge) |
| std::string | get_astMergeCommandFile () const |
| void | set_astMergeCommandFile (std::string astMergeCommandFile) |
| bool | get_C_PreprocessorOnly () const |
| void | set_C_PreprocessorOnly (bool C_PreprocessorOnly) |
| AstAttributeMechanism * | get_attributeMechanism () const |
| FOR INTERNAL USE Access function; if an attribute exists then a pointer to it is returned, else error. | |
| void | set_attributeMechanism (AstAttributeMechanism *attributeMechanism) |
| FOR INTERNAL USE Access function; sets poiner to value AstAttributeMechanism. | |
| std::string | get_compilationPerformanceFile () const |
| void | set_compilationPerformanceFile (std::string compilationPerformanceFile) |
| bool | get_binary_only () const |
| void | set_binary_only (bool binary_only) |
| std::string | get_dataBaseFilename () const |
| void | set_dataBaseFilename (std::string dataBaseFilename) |
| SgDirectoryList * | get_directoryList () const |
| void | set_directoryList (SgDirectoryList *directoryList) |
| virtual | ~SgProject () |
| This is the destructor. | |
Static Public Member Functions | |
| static int | get_verbose (void) |
| DQ: Modified to accept a value on the command line (no longer a boolean variable) value of 0 means quiet and higher values output more information, default value is zero (quiet). | |
| static void | set_verbose (int) |
| static int | numberOfNodes () |
| Returns the total number of IR nodes of this type. | |
| static int | memoryUsage () |
| Returns the size in bytes of the total memory allocated for all IR nodes of this type. | |
| static void | traverseMemoryPoolNodes (ROSE_VisitTraversal &visit) |
| FOR INTERNAL USE Support for visitor pattern. | |
| static void | traverseMemoryPoolVisitorPattern (ROSE_VisitorPattern &visitor) |
| FOR INTERNAL USE Support for visitor pattern. | |
| static void | visitRepresentativeNode (ROSE_VisitTraversal &visit) |
| FOR INTERNAL USE Support for type-based traversal. | |
Static Public Attributes | |
| static int | p_verbose |
| global concept of verbose level which controls useful output from the compiler (values greater than zero increase output level) | |
| static const VariantT | static_variant = V_SgProject |
| static variant value | |
Protected Attributes | |
| SgFileList * | p_fileList_ptr |
| SgStringList | p_originalCommandLineArgumentList |
| Copy of original argc and argv command line passed to ROSE translator (converted to STL list of strings). | |
| int | p_frontendErrorCode |
| Error code returned from EDG front-end processing. | |
| int | p_backendErrorCode |
| Error code returnd from processing of generated source code using vendor compiler. | |
| std::string | p_outputFileName |
| Filename specifiec using "-o" option on command line. | |
| SgStringList | p_sourceFileNameList |
| List of all source file names specified on the command line. | |
| SgStringList | p_objectFileNameList |
| List of all object files specified on the command line. | |
| SgStringList | p_libraryFileList |
| List of all libraries specified on command line. | |
| SgStringList | p_librarySpecifierList |
| List of libraries specified using "-lxxx" syntax. | |
| SgStringList | p_libraryDirectorySpecifierList |
| List of directories specified with "-L" option on command line. | |
| SgStringList | p_includeDirectorySpecifierList |
| List of directories specified with "-I" option on command line. | |
| SgStringList | p_preincludeFileList |
| SgStringList | p_preincludeDirectoryList |
| bool | p_compileOnly |
| This controls if we are to act as a linker (by calling the vendor compiler as a linker/prelinker). | |
| bool | p_wave |
| bool | p_prelink |
| This controls if we are to handle the prelink (not implemented). | |
| SgProject::template_instantiation_enum | p_template_instantiation_mode |
| This controls the degree of template instatiation by ROSE. No template instatiation is required by ROSE if all template instationation can be handled by the backend vendor C++ compiler. | |
| bool | p_astMerge |
| This controls the merging of AST when multiple files are being processed. | |
| std::string | p_astMergeCommandFile |
| This stores the name of the file where information is collected for the AST Merge mechanism. | |
| bool | p_C_PreprocessorOnly |
| AstAttributeMechanism * | p_attributeMechanism |
| std::string | p_compilationPerformanceFile |
| SgStringList | p_includePathList |
| SgStringList | p_excludePathList |
| SgStringList | p_includeFileList |
| SgStringList | p_excludeFileList |
| bool | p_binary_only |
| std::string | p_dataBaseFilename |
| SgDirectoryList * | p_directoryList |
Friends | |
| class | AST_FILE_IO |
| class | SgProjectStorageClass |
| class | AstSpecificDataManagingClass |
| class | AstSpecificDataManagingClassStorageClass |
| std::ostream & | operator<< (std::ostream &os, const Rose_STL_Container< std::string > &l) |
| SgProject * | isSgProject (SgNode *s) |
| Casts pointer from base class to derived class. | |
| const SgProject * | isSgProject (const SgNode *s) |
| Casts pointer from base class to derived class (for const pointers). | |
| SgProject * | SgProject_getPointerFromGlobalIndex (unsigned long globalIndex) |
| Constructor for use by AST File I/O MechanismTypedef used for low level memory access. Typedef used to hold memory addresses as values. Methods to find the pointer to a global and local index. | |
| unsigned long | SgProject_getNumberOfValidNodesAndSetGlobalIndexInFreepointer (unsigned long) |
| Get the size of the memory pool. | |
| void | SgProject_clearMemoryPool () |
| void | SgProject_extendMemoryPoolForFileIO (unsigned long) |
| void | SgProject_getNextValidPointer (std::pair< SgProject *, std::vector< unsigned char * >::const_iterator > &) |
| void | SgProject_resetValidFreepointers () |
Template Instantiation Options
| SgProject::SgProject | ( | const std::vector< std::string > & | argv | ) |
The only useful constructors.
| SgProject::SgProject | ( | int | argc, | |
| char ** | argv | |||
| ) |
| SgProject::SgProject | ( | ) |
default constructor (not meant to be used)
This constructor builds the SgProject base class.
| SgProject::SgProject | ( | const SgProject & | project | ) |
Copy constructor (shallow copy, does not do deep copy of the AST).
| SgProject::SgProject | ( | const SgProjectStorageClass & | source | ) |
| SgProject::~SgProject | ( | ) | [virtual] |
This is the destructor.
There is nothing to delete in this object.
| virtual SgNode* SgProject::copy | ( | SgCopyHelp & | help | ) | const [virtual] |
Reimplemented from SgSupport.
| void SgProject::processCommandLine | ( | const std::vector< std::string > & | argv | ) |
process command line and store options in the SgProject object. This options are used by parse und unparse.
| void SgProject::processCommandLine | ( | int | argc, | |
| char ** | argv | |||
| ) | [inline] |
| int SgProject::parse | ( | ) |
parse input file(s)
| int SgProject::parse | ( | const std::vector< std::string > & | argv | ) |
processes command line and parses all files.
Error code can be accessed using get_frontendErrorCode()
| int SgProject::parse | ( | int | argc, | |
| char ** | argv | |||
| ) | [inline] |
| int SgProject::numberOfFiles | ( | ) | const |
The total number of files in this project (equal to the number of source files specified on the command line).
| int SgProject::numberOfDirectories | ( | ) | const |
Total number of directories in the project.
| SgFile& SgProject::get_file | ( | int | i | ) | const |
Access function for retriving a SgFile object from the list stored internally This function is depricated and "operator[unsigned int]" should be used instead.
| void SgProject::set_file | ( | SgFile & | file | ) |
Access function for putting a new SgFile object into the list stored internally This function is depricated and "get_fileList->push_back(SgFile*)" should be used instead.
| SgFile* SgProject::operator[] | ( | unsigned int | i | ) |
Access function for retriving a SgFile object from the list stored internally.
| void SgProject::unparse | ( | UnparseFormatHelp * | unparseFormatHelp = NULL, |
|
| UnparseDelegate * | unparseDelegate = NULL | |||
| ) |
function to generate output for all files in the project (arguments control code generation)
| int SgProject::compileOutput | ( | const std::string & | compilerName = BACKEND_CXX_COMPILER_NAME_WITH_PATH |
) |
function to compile the output from unparsing the project
| int SgProject::link | ( | std::string | linkerName = BACKEND_CXX_COMPILER_NAME_WITH_PATH |
) |
function to preform linking!
| int SgProject::link | ( | const std::vector< std::string > & | argv, | |
| std::string | linkerName = BACKEND_CXX_COMPILER_NAME_WITH_PATH | |||
| ) |
function to preform linking!
| Rose_STL_Container<std::string> SgProject::getAbsolutePathFileNames | ( | ) | const |
This function generates a list of files resolved to absolute paths (symbolic links should not be resolved).
| static int SgProject::get_verbose | ( | void | ) | [static] |
DQ: Modified to accept a value on the command line (no longer a boolean variable) value of 0 means quiet and higher values output more information, default value is zero (quiet).
| static void SgProject::set_verbose | ( | int | ) | [static] |
| bool SgProject::get_skip_transformation | ( | void | ) | const |
| bool SgProject::get_skip_unparse | ( | void | ) | const |
| bool SgProject::get_useBackendOnly | ( | void | ) | const |
| bool SgProject::get_C_only | ( | void | ) | const |
| bool SgProject::get_C99_only | ( | void | ) | const |
This controls the c99 mode in the frontend.
| bool SgProject::get_Cxx_only | ( | void | ) | const |
| bool SgProject::get_Fortran_only | ( | void | ) | const |
| bool SgProject::get_F77_only | ( | void | ) | const |
| bool SgProject::get_F90_only | ( | void | ) | const |
| bool SgProject::get_F95_only | ( | void | ) | const |
| bool SgProject::get_F2003_only | ( | void | ) | const |
| bool SgProject::get_CoArrayFortran_only | ( | void | ) | const |
| bool SgProject::get_PHP_only | ( | void | ) | const |
| void SgProject::display | ( | const std::string & | label | ) | const |
| void SgProject::initialization | ( | ) |
| virtual void SgProject::fixupCopy | ( | SgNode * | copy, | |
| SgCopyHelp & | help | |||
| ) | const [virtual] |
Reimplemented from SgNode.
| void SgProject::skipfinalCompileStep | ( | bool | value | ) |
| SgStringList& SgProject::get_includePathList | ( | ) |
| const SgStringList& SgProject::get_includePathList | ( | ) | const |
| void SgProject::set_includePathList | ( | const SgStringList & | includePathList | ) |
| SgStringList& SgProject::get_excludePathList | ( | ) |
| const SgStringList& SgProject::get_excludePathList | ( | ) | const |
| void SgProject::set_excludePathList | ( | const SgStringList & | excludePathList | ) |
| SgStringList& SgProject::get_includeFileList | ( | ) |
| const SgStringList& SgProject::get_includeFileList | ( | ) | const |
| void SgProject::set_includeFileList | ( | const SgStringList & | includeFileList | ) |
| SgStringList& SgProject::get_excludeFileList | ( | ) |
| const SgStringList& SgProject::get_excludeFileList | ( | ) | const |
| void SgProject::set_excludeFileList | ( | const SgStringList & | excludeFileList | ) |
| SgFilePtrList& SgProject::get_fileList | ( | ) | const |
| void SgProject::set_fileList | ( | SgFilePtrList & | fileList | ) |
| virtual void SgProject::addNewAttribute | ( | std::string | s, | |
| AstAttribute * | a | |||
| ) | [virtual] |
| virtual AstAttribute* SgProject::getAttribute | ( | std::string | s | ) | const [virtual] |
| virtual void SgProject::updateAttribute | ( | std::string | s, | |
| AstAttribute * | a | |||
| ) | [virtual] |
| virtual void SgProject::setAttribute | ( | std::string | s, | |
| AstAttribute * | a | |||
| ) | [virtual] |
This is a wrapper function with the following semantics: if no attribute of name 's' exists then addNewAttribute(s,a); is called, otherwise updateAttribute(s,a); is called.
Reimplemented from SgNode.
| virtual void SgProject::removeAttribute | ( | std::string | s | ) | [virtual] |
| virtual bool SgProject::attributeExists | ( | std::string | s | ) | const [virtual] |
| virtual int SgProject::numberOfAttributes | ( | ) | const [virtual] |
| virtual std::string SgProject::class_name | ( | ) | const [virtual] |
Copies AST (whole subtree, depending on the SgCopyHelp class returns a string representing the class name.
Reimplemented from SgSupport.
| virtual VariantT SgProject::variantT | ( | ) | const [virtual] |
| void* SgProject::operator new | ( | size_t | size | ) |
| void SgProject::operator delete | ( | void * | pointer, | |
| size_t | size | |||
| ) |
deallocated memory for IR node (returns memory to memory pool for reuse)
Reimplemented from SgSupport.
| void SgProject::operator delete | ( | void * | pointer | ) |
Reimplemented from SgSupport.
| static int SgProject::numberOfNodes | ( | ) | [static] |
| static int SgProject::memoryUsage | ( | ) | [static] |
Returns the size in bytes of the total memory allocated for all IR nodes of this type.
Reimplemented from SgSupport.
| virtual std::vector<SgNode*> SgProject::get_traversalSuccessorContainer | ( | ) | [virtual] |
FOR INTERNAL USE within ROSE traverals mechanism only.
This function builds and returns a copy of ordered container holding pointers to children of this node in a traversal. It is associated with the definition of a tree that is travered by the AST traversal mechanism; a tree that is embeded in the AST (which is a more general graph). This function is used within the implementation of the AST traversal and has a semantics may change in subtle ways that makes it difficult to use in user code. It can return unexpected data members and thus the order and the number of elements is unpredicable and subject to change.
Reimplemented from SgSupport.
| virtual std::vector<std::string> SgProject::get_traversalSuccessorNamesContainer | ( | ) | [virtual] |
FOR INTERNAL USE within ROSE traverals mechanism only.
This function builds and returns a copy of ordered container holding strings used to name data members that are traversed in the IR node. It is associated with the definition of a tree that is travered by the AST traversal mechanism; a tree that is embeded in the AST (which is a more general graph). This function is used within the implementation of the AST traversal and has a semantics may change in subtle ways that makes it difficult to use in user code. It can return unexpected data members and thus the order and the number of elements is unpredicable and subject to change.
Reimplemented from SgSupport.
| virtual size_t SgProject::get_numberOfTraversalSuccessors | ( | ) | [virtual] |
Reimplemented from SgSupport.
| virtual SgNode* SgProject::get_traversalSuccessorByIndex | ( | size_t | idx | ) | [virtual] |
Reimplemented from SgSupport.
| virtual RTIReturnType SgProject::roseRTI | ( | ) | [virtual] |
FOR INTERNAL USE Access to Runtime Type Information (RTI) for this IR nodes.
This function provides runtime type information for accessing the structure of the current node. It is useful for generating code which would dump out or rebuild IR nodes.
Reimplemented from SgSupport.
| virtual const char* SgProject::sage_class_name | ( | ) | const [virtual] |
returns a C style string (char*) representing the class name
Reimplemented from SgSupport.
| void SgProject::executeVisitorMemberFunction | ( | ROSE_VisitorPattern & | visitor | ) |
| static void SgProject::traverseMemoryPoolNodes | ( | ROSE_VisitTraversal & | visit | ) | [static] |
| static void SgProject::traverseMemoryPoolVisitorPattern | ( | ROSE_VisitorPattern & | visitor | ) | [static] |
| static void SgProject::visitRepresentativeNode | ( | ROSE_VisitTraversal & | visit | ) | [static] |
| virtual bool SgProject::isInMemoryPool | ( | ) | [virtual] |
FOR INTERNAL USE This is used in internal tests to verify that all IR nodes are allocated from the heap.
The AST File I/O depends upon the allocation of IR nodes being from the heap, stack based or global IR nodes should not appear in the AST if it will be written out to a file and read back in. To enforce this concept, this function implements a test to verify that the IR node can be found on the heap and is part of a larger test of the whole AST. This test must pass before the AST can be written out to a file. This is part of a compromise in the design of the AST File I/O to support binary streaming of data to files; for performance. It is also rather difficult, but possible, to build a useful AST with IR nodes allocated on the stack or frm global scope, this test filters out such cased from being used with the AST File I/O mechanism.
Reimplemented from SgSupport.
| virtual void SgProject::checkDataMemberPointersIfInMemoryPool | ( | ) | [virtual] |
FOR INTERNAL USE This is used in internal tests to verify that all IR nodes are allocated from the heap.
The AST File I/O depends upon the allocation of IR nodes being from the heap, stack based or global IR nodes should not appear in the AST if it will be written out to a file and read back in. To enforce this concept, this function implements a test to verify that the IR node can be found on the heap and is part of a larger test of the whole AST. This test must pass before the AST can be written out to a file. This is part of a compromise in the design of the AST File I/O to support binary streaming of data to files; for performance. It is also rather difficult, but possible, to build a useful AST with IR nodes allocated on the stack or frm global scope, this test filters out such cased from being used with the AST File I/O mechanism.
Reimplemented from SgSupport.
| virtual std::vector<std::pair<SgNode*,std::string> > SgProject::returnDataMemberPointers | ( | ) | const [virtual] |
FOR INTERNAL USE Returns STL vector of pairs of SgNode* and strings for use in AST tools
This functions is part of general support for many possible tools to operate on the AST. The forms a list of ALL IR node pointers used by each IR node, and is a supperset of the get_traversalSuccessorContainer(). It is (I think) less than the set of pointers used by the AST file I/O. This is part of work implemented by Andreas, and support tools such as the AST graph generation.
Reimplemented from SgSupport.
| virtual void SgProject::processDataMemberReferenceToPointers | ( | ReferenceToPointerHandler * | ) | [virtual] |
FOR INTERNAL USE Processes pairs of references to SgNode* and strings for use in AST tools
This functions similar to returnDataMemberPointers() except that it passes references to a handler object. As a result there is FAR more damage that can be done by using this function, but it is type-safe. This is provided for support of internal tools that operate on the AST, e.g the AST Merge mechanism.
Reimplemented from SgSupport.
| virtual long SgProject::getChildIndex | ( | SgNode * | childNode | ) | const [virtual] |
FOR INTERNAL USE Returns a unique index value for the childNode in the list of children at this IR node.
This function returns a unique value for the input childNode in set of children at this IR node. Note that a negative value indicates that the input node is not a child. This is the basis for the implementation of the isChild(SgNode*) member function. Data members that are NULL in the IR node are counted internally (so that this function returns value that could be statically defined, and so are not dynamically determined).
Reimplemented from SgSupport.
| SgProject* SgProject::addRegExpAttribute | ( | std::string | s, | |
| AstRegExAttribute * | a | |||
| ) |
Support for AST matching using regular expression.
This support is incomplete and the subject of current research to define RegEx trees to support inexact matching.
Reimplemented from SgSupport.
| SgFileList* SgProject::get_fileList_ptr | ( | ) | const |
| void SgProject::set_fileList_ptr | ( | SgFileList * | fileList_ptr | ) |
| list< string > SgProject::get_originalCommandLineArgumentList | ( | ) | const |
Returns a list of strings representing the original command-line.
| void SgProject::set_originalCommandLineArgumentList | ( | SgStringList | originalCommandLineArgumentList | ) |
| int SgProject::get_frontendErrorCode | ( | ) | const |
| void SgProject::set_frontendErrorCode | ( | int | frontendErrorCode | ) |
| int SgProject::get_backendErrorCode | ( | ) | const |
| void SgProject::set_backendErrorCode | ( | int | backendErrorCode | ) |
| std::string SgProject::get_outputFileName | ( | ) | const |
| void SgProject::set_outputFileName | ( | std::string | outputFileName | ) |
| const SgStringList& SgProject::get_sourceFileNameList | ( | ) | const |
| SgStringList& SgProject::get_sourceFileNameList | ( | ) |
| const SgStringList& SgProject::get_objectFileNameList | ( | ) | const |
| SgStringList& SgProject::get_objectFileNameList | ( | ) |
| const SgStringList& SgProject::get_libraryFileList | ( | ) | const |
| SgStringList& SgProject::get_libraryFileList | ( | ) |
| const SgStringList& SgProject::get_librarySpecifierList | ( | ) | const |
| SgStringList& SgProject::get_librarySpecifierList | ( | ) |
| const SgStringList& SgProject::get_libraryDirectorySpecifierList | ( | ) | const |
| SgStringList& SgProject::get_libraryDirectorySpecifierList | ( | ) |
| const SgStringList& SgProject::get_includeDirectorySpecifierList | ( | ) | const |
| SgStringList& SgProject::get_includeDirectorySpecifierList | ( | ) |
| const SgStringList& SgProject::get_preincludeFileList | ( | ) | const |
| SgStringList& SgProject::get_preincludeFileList | ( | ) |
| const SgStringList& SgProject::get_preincludeDirectoryList | ( | ) | const |
| SgStringList& SgProject::get_preincludeDirectoryList | ( | ) |
| bool SgProject::get_compileOnly | ( | ) | const |
| void SgProject::set_compileOnly | ( | bool | compileOnly | ) |
| bool SgProject::get_wave | ( | ) | const |
| void SgProject::set_wave | ( | bool | wave | ) |
| bool SgProject::get_prelink | ( | ) | const |
| void SgProject::set_prelink | ( | bool | prelink | ) |
| SgProject::template_instantiation_enum SgProject::get_template_instantiation_mode | ( | ) | const |
| void SgProject::set_template_instantiation_mode | ( | SgProject::template_instantiation_enum | template_instantiation_mode | ) |
| bool SgProject::get_astMerge | ( | ) | const |
| void SgProject::set_astMerge | ( | bool | astMerge | ) |
| std::string SgProject::get_astMergeCommandFile | ( | ) | const |
| void SgProject::set_astMergeCommandFile | ( | std::string | astMergeCommandFile | ) |
| bool SgProject::get_C_PreprocessorOnly | ( | ) | const |
| void SgProject::set_C_PreprocessorOnly | ( | bool | C_PreprocessorOnly | ) |
| AstAttributeMechanism * SgProject::get_attributeMechanism | ( | ) | const [virtual] |
FOR INTERNAL USE Access function; if an attribute exists then a pointer to it is returned, else error.
This is an access function used for getting the interally held pointer to a valid AstAttributeMechanism. It provides access to lower level functionality of the AstAttributeMechanism, put is mostly of use to internal tools.
Reimplemented from SgNode.
| void SgProject::set_attributeMechanism | ( | AstAttributeMechanism * | a | ) | [virtual] |
FOR INTERNAL USE Access function; sets poiner to value AstAttributeMechanism.
This is an access function used for setting the interally held pointer to a valid AstAttributeMechanism.
Reimplemented from SgNode.
| std::string SgProject::get_compilationPerformanceFile | ( | ) | const |
| void SgProject::set_compilationPerformanceFile | ( | std::string | compilationPerformanceFile | ) |
| bool SgProject::get_binary_only | ( | ) | const |
| void SgProject::set_binary_only | ( | bool | binary_only | ) |
| std::string SgProject::get_dataBaseFilename | ( | ) | const |
| void SgProject::set_dataBaseFilename | ( | std::string | dataBaseFilename | ) |
| SgDirectoryList* SgProject::get_directoryList | ( | ) | const |
| void SgProject::set_directoryList | ( | SgDirectoryList * | directoryList | ) |
friend class AST_FILE_IO [friend] |
Reimplemented from SgSupport.
friend class SgProjectStorageClass [friend] |
friend class AstSpecificDataManagingClass [friend] |
Reimplemented from SgSupport.
friend class AstSpecificDataManagingClassStorageClass [friend] |
Reimplemented from SgSupport.
| std::ostream& operator<< | ( | std::ostream & | os, | |
| const Rose_STL_Container< std::string > & | l | |||
| ) | [friend] |
| SgProject::isSgProject | ( | SgNode * | s | ) | [friend] |
Casts pointer from base class to derived class.
This functions returns a SgProject pointer for any input of a pointer to an object derived from a SgProject.
| SgProject::isSgProject | ( | const SgNode * | s | ) | [friend] |
Casts pointer from base class to derived class (for const pointers).
This functions returns a SgProject pointer for any input of a pointer to an object derived from a SgProject.
| SgProject* SgProject_getPointerFromGlobalIndex | ( | unsigned long | globalIndex | ) | [friend] |
Constructor for use by AST File I/O MechanismTypedef used for low level memory access. Typedef used to hold memory addresses as values. Methods to find the pointer to a global and local index.
| unsigned long SgProject_getNumberOfValidNodesAndSetGlobalIndexInFreepointer | ( | unsigned | long | ) | [friend] |
Get the size of the memory pool.
It actually returns the size of the whole blocks allocated, no matter they contain valid pointers or not.
| void SgProject_clearMemoryPool | ( | ) | [friend] |
| void SgProject_extendMemoryPoolForFileIO | ( | unsigned | long | ) | [friend] |
| void SgProject_getNextValidPointer | ( | std::pair< SgProject *, std::vector< unsigned char * >::const_iterator > & | ) | [friend] |
| void SgProject_resetValidFreepointers | ( | ) | [friend] |
SgProject::p_verbose [static] |
global concept of verbose level which controls useful output from the compiler (values greater than zero increase output level)
For internal use only.
This is a static variable, which might make it difficult to multiple SgProject IR nodes to coexist within the same problem.
const VariantT SgProject::static_variant = V_SgProject [static] |
SgFileList* SgProject::p_fileList_ptr [protected] |
SgProject::p_originalCommandLineArgumentList [protected] |
Copy of original argc and argv command line passed to ROSE translator (converted to STL list of strings).
For internal use only.
This is a deep copy.
SgProject::p_frontendErrorCode [protected] |
Error code returned from EDG front-end processing.
For internal use only.
Value greater than 3 is an error, else just warnings.
SgProject::p_backendErrorCode [protected] |
Error code returnd from processing of generated source code using vendor compiler.
This value should be passed back out of the main() function by the user translator (for support of makefile processing).
For internal use only.
This error code is returned by the ROSE backend() function.
SgProject::p_outputFileName [protected] |
Filename specifiec using "-o" option on command line.
Set as part of normal command line processing within ROSE.
For internal use only.
This is set to a default value of "a.out" if "-o" is not specified.
SgProject::p_sourceFileNameList [protected] |
List of all source file names specified on the command line.
For internal use only.
This can be an empty list (if none are specified). This should be updated by the AST Merge mechanism.
SgProject::p_objectFileNameList [protected] |
List of all object files specified on the command line.
For internal use only.
This can be an empty list (if none are specified).
SgProject::p_libraryFileList [protected] |
List of all libraries specified on command line.
List all libraries specified using ".a" or ".so" syntax.
For internal use only.
Required to assemble link lines for backend vendor compiler.
SgProject::p_librarySpecifierList [protected] |
List of libraries specified using "-lxxx" syntax.
For internal use only.
Required to assemble link lines for backend vendor compiler.
SgProject::p_libraryDirectorySpecifierList [protected] |
List of directories specified with "-L" option on command line.
For internal use only.
SgProject::p_includeDirectorySpecifierList [protected] |
List of directories specified with "-I" option on command line.
For internal use only.
SgStringList SgProject::p_preincludeFileList [protected] |
SgStringList SgProject::p_preincludeDirectoryList [protected] |
SgProject::p_compileOnly [protected] |
This controls if we are to act as a linker (by calling the vendor compiler as a linker/prelinker).
The value of p_compileOnly is true if "-c" appears on the command line and is false if not.
For internal use only.
This is a simple pass through to the vendor compiler to do the linking. If no transformations occured to instantiated templates, then the vendor compiler handles all prelinking template instatiation as well.
bool SgProject::p_wave [protected] |
SgProject::p_prelink [protected] |
This controls if we are to handle the prelink (not implemented).
For internal use only.
We implemented a prelink mechamism, but it was not very robust, so until we have a better one this should be false. It is use to control teting of the existing prelink mechanism (which will be rewritten).
SgProject::p_template_instantiation_mode [protected] |
This controls the degree of template instatiation by ROSE. No template instatiation is required by ROSE if all template instationation can be handled by the backend vendor C++ compiler.
For internal use only.
The default is currently to output only transformed instantiated templates and to do so as static teplate functions where they are instatiated template functions because we don't have a sufficently powerful global prelink mehcanism to control the assignment of instantiated template functions and member functions to files (to avoid multiply defined symbols at link time).
SgProject::p_astMerge [protected] |
This controls the merging of AST when multiple files are being processed.
"-rose:astMerge" triggeres the use of the file specificed by "-rose:astMergeCommandFile <filename>" which stores the working directory and the command line required to compile the target file. It is an error to specify "-rose:astMerge" without also specifying "-rose:astMergeCommandFile <filename>". It is required to specify the "-rose:astMergeCommandFile <filename>" option to first build the required "AST Merge Command File" prior to processing of the "AST Merge Command File"using the "-rose:astMerge" option. See manual for details of AST merge mechansim.
For internal use only.
New mechanism (not yet documented).
SgProject::p_astMergeCommandFile [protected] |
This stores the name of the file where information is collected for the AST Merge mechanism.
"-rose:astMerge" triggeres the use of the file specificed by "-rose:astMergeCommandFile <filename>" which stores the working directory and the command line required to compile the target file. It is an error to specify "-rose:astMerge" without also specifying "-rose:astMergeCommandFile <filename>". It is required to specify the "-rose:astMergeCommandFile <filename>" option to first build the required "AST Merge Command File" prior to processing of the "AST Merge Command File"using the "-rose:astMerge" option. See manual for details of AST merge mechansim.
For internal use only.
New mechanism (not yet documented).
bool SgProject::p_C_PreprocessorOnly [protected] |
AstAttributeMechanism* SgProject::p_attributeMechanism [protected] |
std::string SgProject::p_compilationPerformanceFile [protected] |
SgStringList SgProject::p_includePathList [protected] |
SgStringList SgProject::p_excludePathList [protected] |
SgStringList SgProject::p_includeFileList [protected] |
SgStringList SgProject::p_excludeFileList [protected] |
bool SgProject::p_binary_only [protected] |
std::string SgProject::p_dataBaseFilename [protected] |
SgDirectoryList* SgProject::p_directoryList [protected] |
1.4.7