Changeset db62eef
- Timestamp:
- Aug 13, 2020, 9:05:45 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:
- 67bfc50
- Parents:
- 51230f1b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
driver/cc1.cc
r51230f1b rdb62eef 10 10 // Created On : Fri Aug 26 14:23:51 2005 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sat May 30 18:09:05 202013 // Update Count : 40 412 // Last Modified On : Thu Aug 13 21:03:15 2020 13 // Update Count : 407 14 14 // 15 15 … … 170 170 if ( arg == "-quiet" ) { 171 171 } else if ( arg == "-imultilib" || arg == "-imultiarch" ) { 172 i += 1; // and theargument172 i += 1; // and argument 173 173 } else if ( prefix( arg, "-A" ) ) { 174 174 } else if ( prefix( arg, "-D__GNU" ) ) { … … 177 177 //******** 178 178 } else if ( arg == "-D" && prefix( argv[i + 1], "__GNU" ) ) { 179 i += 1; // and theargument179 i += 1; // and argument 180 180 181 181 // strip flags controlling cpp step … … 184 184 cpp_flag = true; 185 185 } else if ( arg == "-D" && string( argv[i + 1] ) == "__CPP__" ) { 186 i += 1; // and theargument186 i += 1; // and argument 187 187 cpp_flag = true; 188 188 … … 194 194 cpp_out = argv[i]; 195 195 } else { 196 args[nargs++] = argv[i]; // pass theflag along196 args[nargs++] = argv[i]; // pass flag along 197 197 // CPP flags with an argument 198 198 if ( arg == "-D" || arg == "-U" || arg == "-I" || arg == "-MF" || arg == "-MT" || arg == "-MQ" || … … 200 200 arg == "-iwithprefix" || arg == "-iwithprefixbefore" || arg == "-isystem" || arg == "-isysroot" ) { 201 201 i += 1; 202 args[nargs++] = argv[i]; // pass theargument along202 args[nargs++] = argv[i]; // pass argument along 203 203 #ifdef __DEBUG_H__ 204 204 cerr << "argv[" << i << "]:\"" << argv[i] << "\"" << endl; 205 205 #endif // __DEBUG_H__ 206 206 } else if ( arg == "-MD" || arg == "-MMD" ) { 207 // gcc frontend generates the dependency file-name after the -MD/-MMD flag, but it is necessary to 208 // prefix that file name with -MF. 207 209 args[nargs++] = "-MF"; // insert before file 208 210 i += 1; 209 args[nargs++] = argv[i]; // pass theargument along211 args[nargs++] = argv[i]; // pass argument along 210 212 #ifdef __DEBUG_H__ 211 213 cerr << "argv[" << i << "]:\"" << argv[i] << "\"" << endl; … … 279 281 // Run the C preprocessor and save the output in the given file. 280 282 281 if ( fork() == 0 ) { 283 if ( fork() == 0 ) { // child process ? 282 284 // -o xxx.ii cannot be used to write the output file from cpp because no output file is created if cpp detects 283 285 // an error (e.g., cannot find include file). Whereas, output is always generated, even when there is an error, … … 388 390 389 391 } else { 390 args[nargs++] = argv[i]; // pass theflag along392 args[nargs++] = argv[i]; // pass flag along 391 393 if ( arg == "-o" ) { 392 394 i += 1; 393 395 cpp_out = argv[i]; 394 args[nargs++] = argv[i]; // pass theargument along396 args[nargs++] = argv[i]; // pass argument along 395 397 #ifdef __DEBUG_H__ 396 398 cerr << "arg:\"" << argv[i] << "\"" << endl;
Note: See TracChangeset
for help on using the changeset viewer.