Skip to content
Extraits de code Groupes Projets
Valider 809d80ed rédigé par Théotime DONNENFELD's avatar Théotime DONNENFELD
Parcourir les fichiers

WARNING PLACES AU BON ENDROIT

parent a1901e19
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
Pipeline #1140 annulé
......@@ -15,7 +15,7 @@ static void my_pragma_action(cpp_reader *ARG_UNUSED(dummy))
bool already_in;
if (cfun){
printf("!!Pragma placed inside function!!\n");
printf("WARNING :Pragma placed inside function!!\n");
return;
}
......@@ -64,7 +64,7 @@ static void my_pragma_action(cpp_reader *ARG_UNUSED(dummy))
}
else{
printf("Missing closed parenthesis\n");
printf("WARNING :Missing closed parenthesis\n");
return;
}
......@@ -72,7 +72,7 @@ static void my_pragma_action(cpp_reader *ARG_UNUSED(dummy))
}
else{
printf("Invalid pragma - not starting with name or open parenthesis\n");
printf("WARNING :Invalid pragma - not starting with name or open parenthesis\n");
return;
}
......@@ -96,6 +96,13 @@ static void register_my_pragma(void *event_data, void *data)
c_register_pragma ("ProjetCA", "mpicoll_check", my_pragma_action);
}
static void pass_summary(void *event_data, void *data)
{
printf("\nIn PASS summary\n");
compare_pragma_funcs_analyzed_funcs();
}
void compare_pragma_funcs_analyzed_funcs(){
const char *pragma_elt;
......
......@@ -3,5 +3,7 @@
static void register_my_pragma(void *event_data, void *data);
static void my_pragma_action(cpp_reader *ARG_UNUSED(dummy));
static void pass_summary(void *event_data, void *data);
void add_function_to_analyzed_funcs(function * fun);
void compare_pragma_funcs_analyzed_funcs();
#endif
......@@ -153,7 +153,7 @@ class cleanup_pass : public gimple_opt_pass
for (int ix = 0; analyzed_functions.iterate (ix, &elt); ix++){
printf("- %s\n", elt);
}
compare_pragma_funcs_analyzed_funcs();
edit_all_aux_value(fun,(int*)NULL);
return 0;
}
......@@ -204,7 +204,7 @@ int plugin_init(struct plugin_name_args * plugin_info, struct plugin_gcc_version
// REGISTER PRAGMA
register_callback("plugin_name", PLUGIN_PRAGMAS, register_my_pragma, NULL );
register_callback("plugin_name", PLUGIN_FINISH_UNIT, pass_summary, NULL );
return 0;
}
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter