Changeset ca1c11f
- Timestamp:
- Jan 20, 2016, 12:36:27 PM (8 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, 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:
- 771b3c3
- Parents:
- f1e012b
- Location:
- src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/InitTweak/FixInit.cc
rf1e012b rca1c11f 10 10 // Created On : Wed Jan 13 16:29:30 2016 11 11 // Last Modified By : Rob Schluntz 12 // Last Modified On : Tue Jan 19 1 3:25:13201613 // Update Count : 2712 // Last Modified On : Tue Jan 19 16:36:59 2016 13 // Update Count : 30 14 14 // 15 15 … … 73 73 CompoundStmt * FixInit::mutate( CompoundStmt * compoundStmt ) { 74 74 std::list< Statement * > & statements = compoundStmt->get_kids(); 75 for ( std::list< Statement * >::iterator it = statements.begin(); it != statements.end(); ++it) {75 for ( std::list< Statement * >::iterator it = statements.begin(); it != statements.end(); ) { 76 76 // remove if instrinsic destructor statement 77 77 // xxx - test user manually calling intrinsic functions - what happens? … … 81 81 if ( function->get_var()->get_name() == "^?{}" && function->get_var()->get_linkage() == LinkageSpec::Intrinsic ) { 82 82 statements.erase(it++); 83 continue; 84 } else { 83 85 } 84 86 } 85 87 } 86 88 } 89 ++it; 87 90 } 88 91 // mutate non-destructor statements 89 return Mutator::mutate( compoundStmt );92 return PolyMutator::mutate( compoundStmt ); 90 93 } 91 94 -
src/main.cc
rf1e012b rca1c11f 10 10 // Created On : Fri May 15 23:12:02 2015 11 11 // Last Modified By : Rob Schluntz 12 // Last Modified On : Tue Jan 19 1 3:16:23 201613 // Update Count : 1 8512 // Last Modified On : Tue Jan 19 16:28:13 2016 13 // Update Count : 194 14 14 // 15 15 … … 62 62 astp = false, 63 63 bresolvep = false, 64 ctorinitp = false, 64 65 exprp = false, 65 66 expraltp = false, … … 75 76 codegenp = false; 76 77 77 enum { Ast, Bresolver, Expr, ExprAlt, Grammar, LibCFA, Nopreamble, Parse, Prototypes, Resolver, Symbol, Validate, };78 enum { Ast, Bresolver, CtorInitFix, Expr, ExprAlt, Grammar, LibCFA, Nopreamble, Parse, Prototypes, Resolver, Symbol, Validate, }; 78 79 79 80 static struct option long_opts[] = { 80 81 { "ast", no_argument, 0, Ast }, 81 82 { "before-resolver", no_argument, 0, Bresolver }, 83 { "ctorinitfix", no_argument, 0, CtorInitFix }, 82 84 { "expr", no_argument, 0, Expr }, 83 85 { "expralt", no_argument, 0, ExprAlt }, … … 102 104 103 105 int c; 104 while ( (c = getopt_long( argc, argv, "ab efglnpqrsvyzD:", long_opts, &long_index )) != -1 ) {106 while ( (c = getopt_long( argc, argv, "abcefFglnpqrsvyzD:", long_opts, &long_index )) != -1 ) { 105 107 switch ( c ) { 106 108 case Ast: … … 111 113 case 'b': // print before resolver steps 112 114 bresolvep = true; 115 break; 116 case CtorInitFix: 117 case 'c': 118 ctorinitp = true; 113 119 break; 114 120 case Expr: … … 264 270 if ( exprp ) { 265 271 dump( translationUnit ); 272 return 0; 266 273 } 267 274 … … 269 276 // fix ObjectDecl - replaces ConstructorInit nodes 270 277 InitTweak::fix( translationUnit ); 278 if ( ctorinitp ) { 279 dump ( translationUnit ); 280 return 0; 281 } 271 282 272 283 OPTPRINT( "instantiateGeneric" )
Note: See TracChangeset
for help on using the changeset viewer.