Changes in src/main.cc [05e6eb5:036dd5f]
- File:
-
- 1 edited
-
src/main.cc (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/main.cc
r05e6eb5 r036dd5f 28 28 #include <string> // for char_traits, operator<< 29 29 30 #include "CompilationState.h"31 30 #include "../config.h" // for CFA_LIBDIR 32 31 #include "CodeGen/FixMain.h" // for FixMain … … 73 72 DeclarationNode * parseTree = nullptr; // program parse tree 74 73 74 extern int yydebug; // set for -g flag (Grammar) 75 bool 76 astp = false, 77 bresolvep = false, 78 bboxp = false, 79 bcodegenp = false, 80 ctorinitp = false, 81 declstatsp = false, 82 exprp = false, 83 expraltp = false, 84 genericsp = false, 85 libcfap = false, 86 nopreludep = false, 87 noprotop = false, 88 nomainp = false, 89 parsep = false, 90 resolvep = false, // used in AlternativeFinder 91 symtabp = false, 92 treep = false, 93 tuplep = false, 94 validp = false, 95 errorp = false, 96 codegenp = false, 97 prettycodegenp = false, 98 linemarks = false; 99 75 100 static void parse_cmdline( int argc, char *argv[], const char *& filename ); 76 101 static void parse( FILE * input, LinkageSpec::Spec linkage, bool shouldExit = false ); … … 183 208 184 209 // Read to gcc builtins, if not generating the cfa library 185 FILE * gcc_builtins = fopen( buildingLibrary()? "../prelude/gcc-builtins.cf" : CFA_LIBDIR "/gcc-builtins.cf", "r" );210 FILE * gcc_builtins = fopen( libcfap | treep ? "../prelude/gcc-builtins.cf" : CFA_LIBDIR "/gcc-builtins.cf", "r" ); 186 211 assertf( gcc_builtins, "cannot open gcc-builtins.cf\n" ); 187 212 parse( gcc_builtins, LinkageSpec::Compiler ); 188 213 189 214 // read the extra prelude in, if not generating the cfa library 190 FILE * extras = fopen( buildingLibrary()? "../prelude/extras.cf" : CFA_LIBDIR "/extras.cf", "r" );215 FILE * extras = fopen( libcfap | treep ? "../prelude/extras.cf" : CFA_LIBDIR "/extras.cf", "r" ); 191 216 assertf( extras, "cannot open extras.cf\n" ); 192 217 parse( extras, LinkageSpec::BuiltinC ); … … 194 219 if ( ! libcfap ) { 195 220 // read the prelude in, if not generating the cfa library 196 FILE * prelude = fopen( buildingLibrary()? "../prelude/prelude.cf" : CFA_LIBDIR "/prelude.cf", "r" );221 FILE * prelude = fopen( treep ? "../prelude/prelude.cf" : CFA_LIBDIR "/prelude.cf", "r" ); 197 222 assertf( prelude, "cannot open prelude.cf\n" ); 198 223 parse( prelude, LinkageSpec::Intrinsic ); 199 224 200 225 // Read to cfa builtins, if not generating the cfa library 201 FILE * builtins = fopen( buildingLibrary()? "../prelude/builtins.cf" : CFA_LIBDIR "/builtins.cf", "r" );226 FILE * builtins = fopen( libcfap | treep ? "../prelude/builtins.cf" : CFA_LIBDIR "/builtins.cf", "r" ); 202 227 assertf( builtins, "cannot open builtins.cf\n" ); 203 228 parse( builtins, LinkageSpec::BuiltinCFA ); … … 274 299 275 300 // fix ObjectDecl - replaces ConstructorInit nodes 276 PASS( "fixInit", InitTweak::fix( translationUnit, buildingLibrary()) );301 PASS( "fixInit", InitTweak::fix( translationUnit, filename, libcfap || treep ) ); 277 302 if ( ctorinitp ) { 278 303 dump ( translationUnit );
Note:
See TracChangeset
for help on using the changeset viewer.