Changeset 67bfc50
- Timestamp:
- Aug 13, 2020, 9:09:01 PM (4 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- badd22f
- Parents:
- db62eef
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
driver/cfa.cc
rdb62eef r67bfc50 10 10 // Created On : Tue Aug 20 13:44:49 2002 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sat May 30 18:28:23202013 // Update Count : 43 312 // Last Modified On : Thu Aug 13 17:22:02 2020 13 // Update Count : 435 14 14 // 15 15 … … 180 180 181 181 if ( arg == "-Xlinker" || arg == "-o" ) { 182 args[nargs++] = argv[i]; // pass argumentalong182 args[nargs++] = argv[i]; // pass flag along 183 183 i += 1; 184 184 if ( i == argc ) continue; // next argument available ? 185 185 args[nargs++] = argv[i]; // pass argument along 186 186 if ( arg == "-o" ) o_file = i; // remember file 187 } else if ( strncmp(arg.c_str(), "-XCFA", 5) == 0 ) { 188 if (arg.size() == 5) {187 } else if ( strncmp(arg.c_str(), "-XCFA", 5) == 0 ) { // CFA pass through 188 if ( arg.size() == 5 ) { 189 189 i += 1; 190 if ( i == argc ) continue; 190 if ( i == argc ) continue; // next argument available ? 191 191 Putenv( argv, argv[i] ); 192 193 // CFA specific arguments 194 } 195 else if(arg[5] == ',') { 192 } else if ( arg[5] == ',' ) { // CFA specific arguments 196 193 Putenv( argv, argv[i] + 6 ); 197 198 // CFA specific arguments 199 } 200 else { 194 } else { // CFA specific arguments 201 195 args[nargs++] = argv[i]; 202 } 203 196 } // if 204 197 } else if ( arg == "-CFA" ) { 205 198 CFA_flag = true; // strip the -CFA flag … … 235 228 } else if ( arg == "-v" ) { 236 229 verbose = true; // verbosity required 237 args[nargs++] = argv[i]; // pass argumentalong230 args[nargs++] = argv[i]; // pass flag along 238 231 } else if ( arg == "-g" ) { 239 232 debugging = true; // symbolic debugging required 240 args[nargs++] = argv[i]; // pass argumentalong233 args[nargs++] = argv[i]; // pass flag along 241 234 } else if ( arg == "-save-temps" ) { 242 args[nargs++] = argv[i]; // pass argumentalong235 args[nargs++] = argv[i]; // pass flag along 243 236 Putenv( argv, arg ); // save cfa-cpp output 244 237 } else if ( prefix( arg, "-x" ) ) { // file suffix ? 245 238 string lang; 246 args[nargs++] = argv[i]; // pass argumentalong239 args[nargs++] = argv[i]; // pass flag along 247 240 if ( arg.length() == 2 ) { // separate argument ? 248 241 i += 1; … … 261 254 } else if ( prefix( arg, "-std=" ) || prefix( arg, "--std=" ) ) { 262 255 std_flag = true; // -std=XX provided 263 args[nargs++] = argv[i]; // pass argumentalong256 args[nargs++] = argv[i]; // pass flag along 264 257 } else if ( arg == "-w" ) { 265 args[nargs++] = argv[i]; // pass argumentalong258 args[nargs++] = argv[i]; // pass flag along 266 259 Putenv( argv, arg ); 267 260 } else if ( prefix( arg, "-W" ) ) { // check before next tests 268 261 if ( arg == "-Werror" || arg == "-Wall" ) { 269 args[nargs++] = argv[i]; // pass argumentalong262 args[nargs++] = argv[i]; // pass flag along 270 263 Putenv( argv, argv[i] ); 271 264 } else { … … 281 274 bprefix = arg.substr(2); // strip the -B flag 282 275 } else if ( arg == "-c" || arg == "-S" || arg == "-E" || arg == "-M" || arg == "-MM" ) { 283 args[nargs++] = argv[i]; // pass argumentalong276 args[nargs++] = argv[i]; // pass flag along 284 277 if ( arg == "-E" || arg == "-M" || arg == "-MM" ) { 285 278 cpp_flag = true; // cpp only 286 279 } // if 287 280 link = false; // no linkage required 281 } else if ( arg == "-D" || arg == "-U" || arg == "-I" || arg == "-MF" || arg == "-MT" || arg == "-MQ" || 282 arg == "-include" || arg == "-imacros" || arg == "-idirafter" || arg == "-iprefix" || 283 arg == "-iwithprefix" || arg == "-iwithprefixbefore" || arg == "-isystem" || arg == "-isysroot" ) { 284 args[nargs++] = argv[i]; // pass flag along 285 i += 1; 286 args[nargs++] = argv[i]; // pass argument along 288 287 } else if ( arg[1] == 'l' ) { 289 288 // if the user specifies a library, load it after user code
Note: See TracChangeset
for help on using the changeset viewer.