1 #ifndef mangling_support_INCLUDED
2 #define mangling_support_INCLUDED
5 namespace MangledNameSupport
21 typedef std::set<SgClassDefinition*> setType;
23 extern setType visitedTemplateDefinitions;
25 void outputVisitedTemplateDefinitions();
28 std::string replaceNonAlphaNum (
const std::string& s);
31 std::string trimSpaces (
const std::string& s);
34 bool isValidMangledName (std::string name);
39 std::string joinMangledQualifiersToString (
const std::string& base,
const std::string& name);
84 std::string mangleTypesToString (
const SgTypePtrList::const_iterator b,
const SgTypePtrList::const_iterator e);
89 SgName mangleTypes (
const SgTypePtrList::const_iterator b,
const SgTypePtrList::const_iterator e);
107 std::string mangleFunctionNameToString (
const std::string& s,
const std::string& ret_type_name = std::string (
""));
120 std::string mangleTemplateArgsToString (
const SgTemplateArgumentPtrList::const_iterator b,
const SgTemplateArgumentPtrList::const_iterator e);
127 SgName mangleTemplateArgs (
const SgTemplateArgumentPtrList::const_iterator b,
const SgTemplateArgumentPtrList::const_iterator e);
140 std::string mangleTemplateToString (
const std::string& templ_name,
141 const SgTemplateArgumentPtrList& templ_args,
146 const SgTemplateArgumentPtrList& templ_args,
161 mangleTemplateFunctionToString (
const std::string& templ_name,
162 const SgTemplateArgumentPtrList& templ_args,
171 mangleTemplateFunction (
const std::string& templ_name,
172 const SgTemplateArgumentPtrList& templ_args,
182 std::string mangleTemplateArgsToString (
const SgTemplateParameterPtrList::const_iterator b,
const SgTemplateParameterPtrList::const_iterator e);
194 std::string mangleTemplateToString (
const std::string& templ_name,
195 const SgTemplateParameterPtrList& templ_params,
200 const SgTemplateParameterPtrList& templ_params,
204 std::string mangleSgValueExp (
const SgBoolValExp* expr);
207 std::string mangleValueExp (
const SgValueExp* expr);
213 std::string mangleExpression (
const SgExpression* expr);
234 template <
class SgValueExpType_>
236 mangleSgValueExp (
const SgValueExpType_* expr)
239 ROSE_ASSERT (isSgValueExp (expr) || !expr);
241 ostringstream mangled_name;
243 mangled_name << expr->get_value ();
244 return mangled_name.str ();
248 #endif // mangling_support_INCLUDED