Changeset ca35c51 for src/InitTweak
- Timestamp:
- Jun 30, 2016, 1:47:52 PM (9 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, 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:
- 1bc1bb2
- Parents:
- 84d4d6f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/InitTweak/FixGlobalInit.cc
r84d4d6f rca35c51 9 9 // Author : Rob Schluntz 10 10 // Created On : Mon May 04 15:14:56 2016 11 // Last Modified By : Rob Schluntz12 // Last Modified On : Fri May 13 11:37:30201613 // Update Count : 211 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Jun 29 22:33:15 2016 13 // Update Count : 4 14 14 // 15 15 … … 85 85 init->accept( checker ); 86 86 return checker.isConstExpr; 87 } 87 } // if 88 88 // for all intents and purposes, no initializer means const expr 89 89 return true; … … 98 98 } else { 99 99 translationUnit.push_back( fixer.initFunction ); 100 } 100 } // if 101 101 102 if ( fixer.destroyFunction->get_statements()->get_kids().empty() ) { 102 103 delete fixer.destroyFunction; 103 104 } else { 104 105 translationUnit.push_back( fixer.destroyFunction ); 105 } 106 } // if 106 107 } 107 108 … … 146 147 // if ( isConstExpr( objDecl->get_init() ) ) return; 147 148 148 if ( ArrayType * at =dynamic_cast< ArrayType * > ( objDecl->get_type() ) ) {149 if ( dynamic_cast< ArrayType * > ( objDecl->get_type() ) ) { 149 150 // xxx - initialize each element of the array 150 151 } else { … … 164 165 destroy->get_args().push_back( new AddressExpr( new VariableExpr( objDecl ) ) ); 165 166 destroyStatements.push_front( new ImplicitCtorDtorStmt( new ExprStmt( noLabels, destroy ) ) ); 166 } 167 } // if 167 168 } 168 169
Note:
See TracChangeset
for help on using the changeset viewer.