Changeset 0163d3e for driver/cc1.cc
- Timestamp:
- May 30, 2020, 6:30:39 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:
- cb95634
- Parents:
- a491a3c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
driver/cc1.cc
ra491a3c r0163d3e 10 10 // Created On : Fri Aug 26 14:23:51 2005 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : S un Oct 20 08:14:33 201913 // Update Count : 38512 // Last Modified On : Sat May 30 18:09:05 2020 13 // Update Count : 404 14 14 // 15 15 … … 38 38 static string o_file; 39 39 static string bprefix; 40 static string lang; // -x flag 40 41 41 42 … … 73 74 if ( prefix( val, "-compiler=" ) ) { 74 75 compiler_path = val.substr( 10 ); 76 } else if ( prefix( val, "-x=" ) ) { 77 lang = val.substr( 3 ); 75 78 } // if 76 79 } // if … … 100 103 } else if ( prefix( val, "-B=" ) ) { // location of cfa-cpp 101 104 bprefix = val.substr( 3 ); 105 } else if ( prefix( val, "-x=" ) ) { // ignore 102 106 } else { // normal flag for cfa-cpp 103 107 args[nargs++] = ( *new string( arg.substr( arg.find_first_of( "=" ) + 1 ) ) ).c_str(); … … 247 251 248 252 args[0] = compiler_path.c_str(); 249 suffix( cpp_in, args, nargs ); // check suffix 253 if ( lang.size() == 0 ) { 254 suffix( cpp_in, args, nargs ); // check suffix 255 } else { 256 args[nargs++] = "-x"; 257 args[nargs++] = ( *new string( lang.c_str() ) ).c_str(); 258 } // if 250 259 args[nargs++] = cpp_in; 251 260 if ( o_flag ) { // location for output … … 280 289 281 290 args[0] = compiler_path.c_str(); 282 suffix( cpp_in, args, nargs ); // check suffix 291 if ( lang.size() == 0 ) { 292 suffix( cpp_in, args, nargs ); // check suffix 293 } else { 294 args[nargs++] = "-x"; 295 args[nargs++] = ( *new string( lang.c_str() ) ).c_str(); 296 } // if 283 297 args[nargs++] = cpp_in; // input to cpp 284 298 args[nargs] = nullptr; // terminate argument list
Note: See TracChangeset
for help on using the changeset viewer.