Project Stage 3
Goal: After checking if the options are valid. Have to create a global array of afmv_targets and unsigned int of afmv_cnt. This is for others to consume. -fafmv="default" will have a count of 0. -fafmv="default, abc" will have a count of 1. Try to use the target_clone in GCC. Make a afmv.h for the global var I have to make. Header file: #ifndef GCC_AFMV_H #define GCC_AFMV_H /* Storage global variable for AFMV*/ #define AFMV_MAX_ARRAY_SIZE 100 extern unsigned int afmv_cnt; extern char* afmv_targets[AFMV_MAX_ARRAY_SIZE]; #endif /* GCC_AFMV_H */ add include header in opts.cc update count and array if all options passes the chceck. unsigned int afmv_cnt = 0; char* afmv_targets[AFMV_MAX_ARRAY_SIZE]; and if (!is_found) { error_at(loc, "Unsupported option '%s'", feature); is_valid = false; } else { afmv_targets[afmv_cnt++] = feat...