Changeset 6e1e2d0 for driver/cfa.cc


Ignore:
Timestamp:
May 1, 2023, 4:19:09 PM (3 years ago)
Author:
caparsons <caparson@…>
Branches:
ADT, ast-experimental, master
Children:
c083c3d
Parents:
a50fdfb (diff), 985b624 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

resolved merge conflicts

File:
1 edited

Legend:

Unmodified
Added
Removed
  • driver/cfa.cc

    ra50fdfb r6e1e2d0  
    1010// Created On       : Tue Aug 20 13:44:49 2002
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue Feb 14 22:46:38 2023
    13 // Update Count     : 470
     12// Last Modified On : Mon Apr 10 21:16:00 2023
     13// Update Count     : 476
    1414//
    1515
     
    4444        static int flags = 0;
    4545
     46    // This allocation 'leaks' memory from the program to the execution
     47    // environment, as putenv does not manage the storage of the string used
     48    // as an environment variable. This leak is necessary to ensure the
     49    // underlying C string is allocated long enough.
    4650        if ( putenv( (char *)( *new string( string( __CFA_FLAGPREFIX__ + to_string( flags++ ) + "__=" ) + arg ) ).c_str() ) ) {
    4751                cerr << argv[0] << " error, cannot set environment variable." << endl;
     
    198202                                } // if
    199203                        } else if ( arg == "-CFA" ) {
    200                                 CFA_flag = true;                                                // strip the -CFA flag
     204                                CFA_flag = true;                                                // strip -CFA flag
    201205                                link = false;
    202206                                args[nargs++] = "-fsyntax-only";                // stop after stage 2
    203207                        } else if ( arg == "-debug" ) {
    204                                 debug = true;                                                   // strip the debug flag
     208                                debug = true;                                                   // strip debug flag
    205209                        } else if ( arg == "-nodebug" ) {
    206                                 debug = false;                                                  // strip the nodebug flag
     210                                debug = false;                                                  // strip nodebug flag
    207211                        } else if ( arg == "-quiet" ) {
    208                                 quiet = true;                                                   // strip the quiet flag
     212                                quiet = true;                                                   // strip quiet flag
    209213                        } else if ( arg == "-noquiet" ) {
    210                                 quiet = false;                                                  // strip the noquiet flag
     214                                quiet = false;                                                  // strip noquiet flag
     215                        } else if ( arg == "-invariant" ) {
     216                                Putenv( argv, "-" + arg );
     217                        } else if ( arg == "--invariant" ) {
     218                                Putenv( argv, arg );
    211219                        } else if ( arg == "-no-include-stdhdr" ) {
    212                                 noincstd_flag = true;                                   // strip the no-include-stdhdr flag
     220                                noincstd_flag = true;                                   // strip no-include-stdhdr flag
    213221                        } else if ( arg == "-nolib" ) {
    214                                 nolib = true;                                                   // strip the nolib flag
     222                                nolib = true;                                                   // strip nolib flag
    215223                        } else if ( arg == "-help" ) {
    216                                 help = true;                                                    // strip the help flag
     224                                help = true;                                                    // strip help flag
    217225                        } else if ( arg == "-nohelp" ) {
    218                                 help = false;                                                   // strip the nohelp flag
     226                                help = false;                                                   // strip nohelp flag
    219227                        } else if ( arg == "-cfalib") {
    220228                                compiling_libs = true;
     
    274282                                } // if
    275283                        } else if ( prefix( arg, "-B" ) ) {
    276                                 bprefix = arg.substr(2);                                // strip the -B flag
     284                                bprefix = arg.substr(2);                                // strip -B flag
    277285                        } else if ( arg == "-c" || arg == "-S" || arg == "-E" || arg == "-M" || arg == "-MM" ) {
    278286                                args[nargs++] = argv[i];                                // pass flag along
Note: See TracChangeset for help on using the changeset viewer.