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