Changeset 0163d3e
- Timestamp:
- May 30, 2020, 6:30:39 PM (5 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
- Location:
- driver
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified 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 -
TabularUnified driver/cfa.cc ¶
ra491a3c r0163d3e 10 10 // Created On : Tue Aug 20 13:44:49 2002 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Mon May 18 21:50:54202013 // Update Count : 4 2512 // Last Modified On : Sat May 30 18:28:23 2020 13 // Update Count : 433 14 14 // 15 15 … … 243 243 lang = arg.substr( 2 ); 244 244 } // if 245 x_flag = lang != "none"; 245 if ( x_flag ) { 246 cerr << argv[0] << " warning, only one -x flag per compile, ignoring subsequent flag." << endl; 247 } else { 248 x_flag = true; 249 Putenv( argv, string( "-x=" ) + lang ); 250 } // if 246 251 } else if ( prefix( arg, "-std=" ) || prefix( arg, "--std=" ) ) { 247 252 std_flag = true; // -std=XX provided
Note: See TracChangeset
for help on using the changeset viewer.