ROSE
0.9.6a
|
Go to the source code of this file.
Functions | |
std::string | replaceNonAlphaNum (const std::string &s) |
std::string | trimSpaces (const std::string &s) |
Returns the input std::string stripped of leading and trailing spaces. More... | |
std::string | joinMangledQualifiersToString (const std::string &base, const std::string &name) |
Joins two sets of mangled qualifiers to form a new mangled qualifier. More... | |
SgName | joinMangledQualifiers (const SgName &base, const SgName &name) |
Joins two sets of mangled qualifiers to form a new mangled qualifier. More... | |
const SgFunctionDefinition * | findRootFunc (const SgScopeStatement *scope) |
Returns the function definition containing the specified statement. More... | |
size_t | getLocalScopeNum (const SgFunctionDefinition *func_def, const SgScopeStatement *target) |
std::string | mangleLocalScopeToString (const SgScopeStatement *scope) |
Produces a mangled name for a scope statement. More... | |
std::string | mangleQualifiersToString (const SgScopeStatement *scope) |
SgName | mangleQualifiers (const SgScopeStatement *scope) |
std::string | mangleTypesToString (const SgTypePtrList::const_iterator b, const SgTypePtrList::const_iterator e) |
SgName | mangleTypes (const SgTypePtrList::const_iterator b, const SgTypePtrList::const_iterator e) |
std::string | mangleFunctionNameToString (const std::string &s, const std::string &ret_type_name=std::string("")) |
SgName | mangleFunctionName (const SgName &n, const SgName &ret_type_name=SgName("")) |
std::string | mangleTemplateArgsToString (const SgTemplateArgumentPtrList::const_iterator b, const SgTemplateArgumentPtrList::const_iterator e) |
std::string | mangleTemplateToString (const std::string &templ_name, const SgTemplateArgumentPtrList &templ_args, const SgScopeStatement *scope) |
SgName | mangleTemplate (const SgName &templ_name, const SgTemplateArgumentPtrList &templ_args, const SgScopeStatement *scope) |
Mangles an instantiated template, returning an SgName object. More... | |
std::string | mangleTemplateFunctionToString (const std::string &templ_name, const SgTemplateArgumentPtrList &templ_args, const SgFunctionType *func_type, const SgScopeStatement *scope) |
SgName | mangleTemplateFunction (const std::string &templ_name, const SgTemplateArgumentPtrList &templ_args, const SgFunctionType *func_type, const SgScopeStatement *scope) |
std::string | mangleSgValueExp (const SgBoolValExp *expr) |
Mangles a boolean expression. More... | |
std::string | mangleValueExp (const SgValueExp *expr) |
Mangles a value expression, as used in a template argument. More... | |
std::string | mangleExpression (const SgExpression *expr) |
std::string | mangleTranslationUnitQualifiers (const SgDeclarationStatement *decl) |
std::string replaceNonAlphaNum | ( | const std::string & | s) |
std::string trimSpaces | ( | const std::string & | s) |
Returns the input std::string stripped of leading and trailing spaces.
std::string joinMangledQualifiersToString | ( | const std::string & | base, |
const std::string & | name | ||
) |
Joins two sets of mangled qualifiers to form a new mangled qualifier.
Joins two sets of mangled qualifiers to form a new mangled qualifier.
const SgFunctionDefinition* findRootFunc | ( | const SgScopeStatement * | scope) |
Returns the function definition containing the specified statement.
size_t getLocalScopeNum | ( | const SgFunctionDefinition * | func_def, |
const SgScopeStatement * | target | ||
) |
Returns a unique positive integer ID to an SgScopeStatement within a function definition.
This routine computes a preorder numbering of the SgScopeStatements in the subtree rooted at 'func_def', and returns the number assigned to the 'target' scope statement, or 0 if the target could not be found in 'func_def'.
std::string mangleLocalScopeToString | ( | const SgScopeStatement * | scope) |
Produces a mangled name for a scope statement.
std::string mangleQualifiersToString | ( | const SgScopeStatement * | scope) |
Mangles a chain of qualifiers followed from a given scope.
This routine starts at a given scope and collects all mangled scope names going 'up' through to global scope.
SgName mangleQualifiers | ( | const SgScopeStatement * | scope) |
Mangles a chain of qualifiers, returning an SgName object.
std::string mangleTypesToString | ( | const SgTypePtrList::const_iterator | b, |
const SgTypePtrList::const_iterator | e | ||
) |
Mangles a container of types, returning an STL std::string object.
[in] | b | First element in the container to mangle. |
[in] | e | End (last+1) element in the container to mangle. |
SgName mangleTypes | ( | const SgTypePtrList::const_iterator | b, |
const SgTypePtrList::const_iterator | e | ||
) |
Mangles a list of types, returning an SgName object.
std::string mangleFunctionNameToString | ( | const std::string & | s, |
const std::string & | ret_type_name = std::string("") |
||
) |
Returns a mangled form of special C++ function names (excl. qualifiers).
Adapted from SgType::mangledNameSupport. This routine considers these cases:
The caller may omit the second parameter to this function, but that is not recommended.
[in] | s | Unmangled function name. |
[in] | ret_type_name | Return type of this function, as a mangled name. |
Returns a mangled form of a C++ function name, as an SgName object.
std::string mangleTemplateArgsToString | ( | const SgTemplateArgumentPtrList::const_iterator | b, |
const SgTemplateArgumentPtrList::const_iterator | e | ||
) |
Mangles a template argument container, returning an STL std::string.
[in] | b | First element in the container to mangle. |
[in] | e | End (last+1) in the container to mangle. |
std::string mangleTemplateToString | ( | const std::string & | templ_name, |
const SgTemplateArgumentPtrList & | templ_args, | ||
const SgScopeStatement * | scope | ||
) |
Mangles an instantiated template.
[in] | templ_name | Unmangled base name of the template. This std::string should not contain the template arguments (i.e., should be 'foo' and not 'foo < int >'). |
[in] | templ_args | Container of template arguments. |
[in] | scope | Scope of the function (e.g., via 'get_scope ()'), used to get qualifiers. |
SgName mangleTemplate | ( | const SgName & | templ_name, |
const SgTemplateArgumentPtrList & | templ_args, | ||
const SgScopeStatement * | scope | ||
) |
Mangles an instantiated template, returning an SgName object.
std::string mangleTemplateFunctionToString | ( | const std::string & | templ_name, |
const SgTemplateArgumentPtrList & | templ_args, | ||
const SgFunctionType * | func_type, | ||
const SgScopeStatement * | scope | ||
) |
Mangles an instantiated template function or template member function.
[in] | templ_name | Unmangled base name of the function. This std::string should not contain the template arguments (i.e., should be 'foo' and not 'foo < int >'). |
[in] | templ_args | Container of template arguments. |
[in] | func_type | The function's type (e.g., via 'get_type ()') |
[in] | scope | Scope of the function (e.g., via 'get_scope ()'), used to get qualifiers. |
SgName mangleTemplateFunction | ( | const std::string & | templ_name, |
const SgTemplateArgumentPtrList & | templ_args, | ||
const SgFunctionType * | func_type, | ||
const SgScopeStatement * | scope | ||
) |
Mangles an instantiated template function or member function, returning a SgName object.
std::string mangleSgValueExp | ( | const SgBoolValExp * | expr) |
Mangles a boolean expression.
std::string mangleValueExp | ( | const SgValueExp * | expr) |
Mangles a value expression, as used in a template argument.
std::string mangleExpression | ( | const SgExpression * | expr) |
Mangles a constant expression, needed for template arguments.
std::string mangleTranslationUnitQualifiers | ( | const SgDeclarationStatement * | decl) |
If the declaration has translation unit scope (as opposed to program scope), mangle the translation unit name.