00001 #ifndef MISC_H_INCLUDED_ 00002 #define MISC_H_INCLUDED_ 00003 00004 #include "rose.h" 00005 #include <string> 00006 00007 namespace risc 00008 { 00009 00010 namespace tools 00011 { 00012 00019 bool 00020 is_data_structure(SgType* type); 00021 00028 bool 00029 is_builtin_type(SgType* type); 00030 00031 00038 bool 00039 class_types_are_identical(SgClassDefinition* cd1, SgClassDefinition* cd2); 00040 00047 bool 00048 is_func_name(const SgFunctionDeclaration* function, const std::string& name); 00049 00055 void 00056 print_indented(std::string s, unsigned indent); 00057 00064 SgClassDefinition* 00065 class_definition_of_variable(SgVariableDeclaration* var_decl); 00066 00074 bool 00075 is_builtin_function(SgFunctionDeclaration *func_decl); 00076 00099 bool 00100 all_cfg_branches_end_in_break(SgNode *node, int &break_counter); 00101 00124 bool 00125 all_cfg_branches_end_in_continue(SgNode *node, int &continue_counter); 00126 00134 SgStatement* 00135 get_previous_stmt_in_basic_block(SgNode *node); 00136 00144 bool 00145 is_conditional_break(SgScopeStatement const * const loop_stmt, 00146 SgBreakStmt const * const break_stmt); 00147 00154 SgScopeStatement* 00155 find_break_surrounding_scope(SgBreakStmt *break_stmt); 00156 00165 bool 00166 break_belongs_to_loop(SgScopeStatement *loop_stmt, 00167 SgBreakStmt const * const break_stmt); 00168 00169 bool is_located_in_rose_header(SgNode *node); 00170 00178 SgMemberFunctionDeclaration* 00179 get_constructor(SgClassDefinition *class_def); 00180 00181 }; // end namespace tools 00182 00183 }; // end namespace risc 00184 00185 #endif /* MISC_H_INCLUDED_ */ 00186 00187 /* ex: set softtabstop=2 tabstop=2 shiftwidth=2 expandtab: */