Changeset 3fe34ae
- Timestamp:
- Jan 12, 2017, 2:05:03 PM (8 years ago)
- 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:
- 7cc2c8d, 981bdc6
- Parents:
- 0270824
- Files:
-
- 1 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
.gitignore
r0270824 r3fe34ae 31 31 src/prelude/builtins.cf 32 32 src/prelude/extras.cf 33 src/prelude/bootloader.c 33 34 src/libcfa/libcfa-prelude.c 34 35 -
src/SynTree/FunctionDecl.cc
r0270824 r3fe34ae 23 23 #include "InitTweak/InitTweak.h" 24 24 25 extern bool translation_unit_nomain; 26 25 27 FunctionDecl::FunctionDecl( const std::string &name, DeclarationNode::StorageClass sc, LinkageSpec::Spec linkage, FunctionType *type, CompoundStmt *statements, bool isInline, bool isNoreturn, std::list< Attribute * > attributes ) 26 28 : Parent( name, sc, linkage, attributes ), type( type ), statements( statements ) { … … 30 32 // because we want to replace the main even if it is inside an extern 31 33 if ( name == "main" ) { 32 set_linkage( LinkageSpec::Cforall );34 set_linkage( translation_unit_nomain ? LinkageSpec::C : LinkageSpec::Cforall ); 33 35 } // if 34 36 } -
src/main.cc
r0270824 r3fe34ae 66 66 nopreludep = false, 67 67 noprotop = false, 68 nomainp = false, 68 69 parsep = false, 69 70 resolvep = false, // used in AlternativeFinder … … 79 80 static void dump( list< Declaration * > & translationUnit, ostream & out = cout ); 80 81 82 bool translation_unit_nomain = true; 81 83 std::unique_ptr<FunctionDecl> translation_unit_main_signature = nullptr; 82 84 … … 157 159 158 160 parse_cmdline( argc, argv, filename ); // process command-line arguments 161 translation_unit_nomain = nomainp; 159 162 160 163 try { … … 375 378 376 379 int c; 377 while ( (c = getopt_long( argc, argv, "abBcefgl npqrstTvyzD:F:", long_opts, &long_index )) != -1 ) {380 while ( (c = getopt_long( argc, argv, "abBcefglmnpqrstTvyzD:F:", long_opts, &long_index )) != -1 ) { 378 381 switch ( c ) { 379 382 case Ast: … … 415 418 case 'p': // generate prototypes for preamble functions 416 419 noprotop = true; 420 break; 421 case 'm': // don't replace the main 422 nomainp = true; 417 423 break; 418 424 case Parse: -
src/prelude/Makefile.am
r0270824 r3fe34ae 20 20 # put into lib for now 21 21 cfalibdir = ${libdir} 22 cfalib_DATA = builtins.cf extras.cf prelude.cf 22 cfalib_DATA = builtins.cf extras.cf prelude.cf bootloader.c 23 23 noinst_DATA = ../libcfa/libcfa-prelude.c 24 24 … … 45 45 ${AM_V_GEN}${abs_top_srcdir}/src/driver/cfa-cpp -l prelude.cf $@ # use src/cfa-cpp as not in lib until after install 46 46 47 bootloader.c : bootloader.cf extras.cf builtins.cf ${abs_top_srcdir}/src/driver/cfa-cpp 48 ${AM_V_GEN}${abs_top_srcdir}/src/driver/cfa-cpp -tpm bootloader.cf $@ # use src/cfa-cpp as not in lib until after install 47 49 48 MAINTAINERCLEANFILES = builtins.c builtins.cf extras.cf ${addprefix ${libdir}/,${cfalib_DATA}} ${addprefix ${libdir}/,${lib_LIBRARIES}}50 MAINTAINERCLEANFILES = builtins.c builtins.cf extras.cf bootloader.c ${addprefix ${libdir}/,${cfalib_DATA}} ${addprefix ${libdir}/,${lib_LIBRARIES}} -
src/prelude/Makefile.in
r0270824 r3fe34ae 210 210 # put into lib for now 211 211 cfalibdir = ${libdir} 212 cfalib_DATA = builtins.cf extras.cf prelude.cf 212 cfalib_DATA = builtins.cf extras.cf prelude.cf bootloader.c 213 213 noinst_DATA = ../libcfa/libcfa-prelude.c 214 MAINTAINERCLEANFILES = builtins.c builtins.cf extras.cf ${addprefix ${libdir}/,${cfalib_DATA}} ${addprefix ${libdir}/,${lib_LIBRARIES}}214 MAINTAINERCLEANFILES = builtins.c builtins.cf extras.cf bootloader.c ${addprefix ${libdir}/,${cfalib_DATA}} ${addprefix ${libdir}/,${lib_LIBRARIES}} 215 215 all: all-am 216 216 … … 441 441 ${AM_V_GEN}${abs_top_srcdir}/src/driver/cfa-cpp -l prelude.cf $@ # use src/cfa-cpp as not in lib until after install 442 442 443 bootloader.c : bootloader.cf extras.cf builtins.cf ${abs_top_srcdir}/src/driver/cfa-cpp 444 ${AM_V_GEN}${abs_top_srcdir}/src/driver/cfa-cpp -tpm bootloader.cf $@ # use src/cfa-cpp as not in lib until after install 445 443 446 # Tell versions [3.59,3.63) of GNU make to not export all variables. 444 447 # Otherwise a system limit (for SysV at least) may be exceeded.
Note: See TracChangeset
for help on using the changeset viewer.