Changeset 711eee5
- Timestamp:
- May 4, 2016, 4:57:43 PM (7 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- 4e24610
- Parents:
- 1b7ea43
- Location:
- src
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/InitTweak/module.mk
r1b7ea43 r711eee5 11 11 ## Created On : Mon Jun 1 17:49:17 2015 12 12 ## Last Modified By : Rob Schluntz 13 ## Last Modified On : Mon Jan 11 14:40:16201613 ## Last Modified On : Wed May 04 16:03:49 2016 14 14 ## Update Count : 2 15 15 ############################################################################### 16 16 17 SRC += InitTweak/RemoveInit.cc 17 SRC += InitTweak/RemoveInit.cc \ 18 InitTweak/FixGlobalInit.cc 18 19 -
src/Makefile.in
r1b7ea43 r711eee5 124 124 GenPoly/driver_cfa_cpp-DeclMutator.$(OBJEXT) \ 125 125 InitTweak/driver_cfa_cpp-RemoveInit.$(OBJEXT) \ 126 InitTweak/driver_cfa_cpp-FixGlobalInit.$(OBJEXT) \ 126 127 Parser/driver_cfa_cpp-parser.$(OBJEXT) \ 127 128 Parser/driver_cfa_cpp-lex.$(OBJEXT) \ … … 346 347 GenPoly/CopyParams.cc GenPoly/FindFunction.cc \ 347 348 GenPoly/DeclMutator.cc InitTweak/RemoveInit.cc \ 348 Parser/parser.yy Parser/lex.ll Parser/TypedefTable.cc \ 349 Parser/ParseNode.cc Parser/DeclarationNode.cc \ 350 Parser/ExpressionNode.cc Parser/StatementNode.cc \ 351 Parser/InitializerNode.cc Parser/TypeData.cc \ 352 Parser/LinkageSpec.cc Parser/parseutility.cc Parser/Parser.cc \ 349 InitTweak/FixGlobalInit.cc Parser/parser.yy Parser/lex.ll \ 350 Parser/TypedefTable.cc Parser/ParseNode.cc \ 351 Parser/DeclarationNode.cc Parser/ExpressionNode.cc \ 352 Parser/StatementNode.cc Parser/InitializerNode.cc \ 353 Parser/TypeData.cc Parser/LinkageSpec.cc \ 354 Parser/parseutility.cc Parser/Parser.cc \ 353 355 ResolvExpr/AlternativeFinder.cc ResolvExpr/Alternative.cc \ 354 356 ResolvExpr/Unify.cc ResolvExpr/PtrsAssignable.cc \ … … 562 564 @: > InitTweak/$(DEPDIR)/$(am__dirstamp) 563 565 InitTweak/driver_cfa_cpp-RemoveInit.$(OBJEXT): \ 566 InitTweak/$(am__dirstamp) InitTweak/$(DEPDIR)/$(am__dirstamp) 567 InitTweak/driver_cfa_cpp-FixGlobalInit.$(OBJEXT): \ 564 568 InitTweak/$(am__dirstamp) InitTweak/$(DEPDIR)/$(am__dirstamp) 565 569 Parser/parser.h: Parser/parser.cc … … 792 796 -rm -f GenPoly/driver_cfa_cpp-ScrubTyVars.$(OBJEXT) 793 797 -rm -f GenPoly/driver_cfa_cpp-Specialize.$(OBJEXT) 798 -rm -f InitTweak/driver_cfa_cpp-FixGlobalInit.$(OBJEXT) 794 799 -rm -f InitTweak/driver_cfa_cpp-RemoveInit.$(OBJEXT) 795 800 -rm -f Parser/driver_cfa_cpp-DeclarationNode.$(OBJEXT) … … 897 902 @AMDEP_TRUE@@am__include@ @am__quote@GenPoly/$(DEPDIR)/driver_cfa_cpp-ScrubTyVars.Po@am__quote@ 898 903 @AMDEP_TRUE@@am__include@ @am__quote@GenPoly/$(DEPDIR)/driver_cfa_cpp-Specialize.Po@am__quote@ 904 @AMDEP_TRUE@@am__include@ @am__quote@InitTweak/$(DEPDIR)/driver_cfa_cpp-FixGlobalInit.Po@am__quote@ 899 905 @AMDEP_TRUE@@am__include@ @am__quote@InitTweak/$(DEPDIR)/driver_cfa_cpp-RemoveInit.Po@am__quote@ 900 906 @AMDEP_TRUE@@am__include@ @am__quote@Parser/$(DEPDIR)/driver_cfa_cpp-DeclarationNode.Po@am__quote@ … … 1380 1386 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -c -o InitTweak/driver_cfa_cpp-RemoveInit.obj `if test -f 'InitTweak/RemoveInit.cc'; then $(CYGPATH_W) 'InitTweak/RemoveInit.cc'; else $(CYGPATH_W) '$(srcdir)/InitTweak/RemoveInit.cc'; fi` 1381 1387 1388 InitTweak/driver_cfa_cpp-FixGlobalInit.o: InitTweak/FixGlobalInit.cc 1389 @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -MT InitTweak/driver_cfa_cpp-FixGlobalInit.o -MD -MP -MF InitTweak/$(DEPDIR)/driver_cfa_cpp-FixGlobalInit.Tpo -c -o InitTweak/driver_cfa_cpp-FixGlobalInit.o `test -f 'InitTweak/FixGlobalInit.cc' || echo '$(srcdir)/'`InitTweak/FixGlobalInit.cc 1390 @am__fastdepCXX_TRUE@ $(am__mv) InitTweak/$(DEPDIR)/driver_cfa_cpp-FixGlobalInit.Tpo InitTweak/$(DEPDIR)/driver_cfa_cpp-FixGlobalInit.Po 1391 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='InitTweak/FixGlobalInit.cc' object='InitTweak/driver_cfa_cpp-FixGlobalInit.o' libtool=no @AMDEPBACKSLASH@ 1392 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 1393 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -c -o InitTweak/driver_cfa_cpp-FixGlobalInit.o `test -f 'InitTweak/FixGlobalInit.cc' || echo '$(srcdir)/'`InitTweak/FixGlobalInit.cc 1394 1395 InitTweak/driver_cfa_cpp-FixGlobalInit.obj: InitTweak/FixGlobalInit.cc 1396 @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -MT InitTweak/driver_cfa_cpp-FixGlobalInit.obj -MD -MP -MF InitTweak/$(DEPDIR)/driver_cfa_cpp-FixGlobalInit.Tpo -c -o InitTweak/driver_cfa_cpp-FixGlobalInit.obj `if test -f 'InitTweak/FixGlobalInit.cc'; then $(CYGPATH_W) 'InitTweak/FixGlobalInit.cc'; else $(CYGPATH_W) '$(srcdir)/InitTweak/FixGlobalInit.cc'; fi` 1397 @am__fastdepCXX_TRUE@ $(am__mv) InitTweak/$(DEPDIR)/driver_cfa_cpp-FixGlobalInit.Tpo InitTweak/$(DEPDIR)/driver_cfa_cpp-FixGlobalInit.Po 1398 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='InitTweak/FixGlobalInit.cc' object='InitTweak/driver_cfa_cpp-FixGlobalInit.obj' libtool=no @AMDEPBACKSLASH@ 1399 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 1400 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -c -o InitTweak/driver_cfa_cpp-FixGlobalInit.obj `if test -f 'InitTweak/FixGlobalInit.cc'; then $(CYGPATH_W) 'InitTweak/FixGlobalInit.cc'; else $(CYGPATH_W) '$(srcdir)/InitTweak/FixGlobalInit.cc'; fi` 1401 1382 1402 Parser/driver_cfa_cpp-parser.o: Parser/parser.cc 1383 1403 @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -MT Parser/driver_cfa_cpp-parser.o -MD -MP -MF Parser/$(DEPDIR)/driver_cfa_cpp-parser.Tpo -c -o Parser/driver_cfa_cpp-parser.o `test -f 'Parser/parser.cc' || echo '$(srcdir)/'`Parser/parser.cc -
src/main.cc
r1b7ea43 r711eee5 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // main.cc -- 7 // main.cc -- 8 8 // 9 9 // Author : Richard C. Bilson 10 10 // Created On : Fri May 15 23:12:02 2015 11 // Last Modified By : Peter A. Buhr12 // Last Modified On : Wed Jan 27 22:20:20201611 // Last Modified By : Rob Schluntz 12 // Last Modified On : Wed May 04 16:54:52 2016 13 13 // Update Count : 199 14 14 // … … 41 41 #include "InitTweak/Mutate.h" 42 42 #include "InitTweak/RemoveInit.h" 43 #include "InitTweak/FixGlobalInit.h" 43 44 //#include "Explain/GenProlog.h" 44 45 //#include "Try/Visit.h" … … 100 101 101 102 opterr = 0; // prevent getopt from printing error messages 102 103 103 104 int c; 104 105 while ( (c = getopt_long( argc, argv, "abefglnpqrstvyzD:", long_opts, &long_index )) != -1 ) { … … 172 173 173 174 try { 175 std::string fileName; 176 174 177 // choose to read the program from a file or stdin 175 178 if ( optind < argc ) { 176 179 input = fopen( argv[ optind ], "r" ); 177 180 if ( ! input ) { 178 std::cout << "Error: can't open " << argv[ optind] << std::endl;181 std::cout << "Error: can't open " << argv[ optind ] << std::endl; 179 182 exit( 1 ); 180 183 } // if 181 184 optind += 1; 185 186 // assert( optind < argc ); 187 fileName = argv[ optind-1 ]; // placeholder 188 // optind += 1; 182 189 } else { 183 190 input = stdin; … … 187 194 output = new ofstream( argv[ optind ] ); 188 195 } // if 189 196 190 197 Parser::get_parser().set_debug( grammarp ); 191 198 … … 208 215 exit( 1 ); 209 216 } // if 210 217 211 218 parse( prelude, LinkageSpec::Intrinsic ); 212 219 } // if 213 220 } // if 214 221 215 parse( input, libcfap ? LinkageSpec::Intrinsic : LinkageSpec::Cforall, grammarp ); 216 222 parse( input, libcfap ? LinkageSpec::Intrinsic : LinkageSpec::Cforall, grammarp ); 223 217 224 if ( parsep ) { 218 225 Parser::get_parser().get_parseTree()->printList( std::cout ); … … 249 256 OPTPRINT( "mutate" ) 250 257 ControlStruct::mutate( translationUnit ); 251 OPTPRINT( "fixNames" ) 258 OPTPRINT( "fixNames" ) 252 259 CodeGen::fixNames( translationUnit ); 260 OPTPRINT( "fixGlobalInit" ); 261 InitTweak::fixGlobalInit( translationUnit, fileName ); 253 262 OPTPRINT( "tweak" ) 254 263 InitTweak::tweak( translationUnit ); … … 278 287 OPTPRINT( "box" ) 279 288 GenPoly::box( translationUnit ); 280 289 281 290 // print tree right before code generation 282 291 if ( codegenp ) { … … 334 343 std::list< Declaration * > decls; 335 344 if ( noprotop ) { 336 filter( translationUnit.begin(), translationUnit.end(), 345 filter( translationUnit.begin(), translationUnit.end(), 337 346 std::back_inserter( decls ), notPrelude ); 338 347 } else {
Note: See TracChangeset
for help on using the changeset viewer.