Changeset a12d5aa for src/main.cc


Ignore:
Timestamp:
Jun 29, 2017, 5:13:42 PM (7 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
435e75f
Parents:
62423350 (diff), 1abc5ab (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:

Merge branch 'master' into designations

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/main.cc

    r62423350 ra12d5aa  
    1010// Author           : Richard C. Bilson
    1111// Created On       : Fri May 15 23:12:02 2015
    12 // Last Modified By : Andrew Beach
    13 // Last Modified On : Wed May 10 14:45:00 2017
    14 // Update Count     : 437
     12// Last Modified By : Peter A. Buhr
     13// Last Modified On : Thu Jun 29 12:46:50 2017
     14// Update Count     : 441
    1515//
    1616
     
    2525using namespace std;
    2626
    27 #include "Parser/lex.h"
    28 #include "Parser/parser.h"
     27#include "Parser/parser.hh"
    2928#include "Parser/TypedefTable.h"
    3029#include "GenPoly/Lvalue.h"
     
    186185                if ( ! nopreludep ) {                                                   // include gcc builtins
    187186                        // -l is for initial build ONLY and builtins.cf is not in the lib directory so access it here.
    188                         FILE * builtins = fopen( libcfap | treep ? "../prelude/builtins.cf" : CFA_LIBDIR "/builtins.cf", "r" );
    189                         assertf( builtins, "cannot open builtins.cf\n" );
    190                         parse( builtins, LinkageSpec::Compiler );
     187
     188                        // Read to gcc builtins, if not generating the cfa library
     189                        FILE * gcc_builtins = fopen( libcfap | treep ? "../prelude/gcc-builtins.cf" : CFA_LIBDIR "/gcc-builtins.cf", "r" );
     190                        assertf( gcc_builtins, "cannot open gcc-builtins.cf\n" );
     191                        parse( gcc_builtins, LinkageSpec::Compiler );
    191192
    192193                        // read the extra prelude in, if not generating the cfa library
     
    200201                                assertf( prelude, "cannot open prelude.cf\n" );
    201202                                parse( prelude, LinkageSpec::Intrinsic );
     203
     204                                // Read to cfa builtins, if not generating the cfa library
     205                                FILE * builtins = fopen( libcfap | treep ? "../prelude/builtins.cf" : CFA_LIBDIR "/builtins.cf", "r" );
     206                                assertf( builtins, "cannot open builtins.cf\n" );
     207                                parse( builtins, LinkageSpec::Builtin );
    202208                        } // if
    203209                } // if
     
    475481                        break;
    476482                  case '?':
    477                         assertf( false, "Unknown option: '%c'\n", (char)optopt );
     483                        if ( optopt ) {                                                         // short option ?
     484                                assertf( false, "Unknown option: -%c\n", (char)optopt );
     485                        } else {
     486                                assertf( false, "Unknown option: %s\n", argv[optind - 1] );
     487                        } // if
    478488                  default:
    479489                        abort();
Note: See TracChangeset for help on using the changeset viewer.