- Timestamp:
- Jun 16, 2017, 3:25:58 PM (7 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:
- 0e44184, 1bc9dcb, 20877d2
- Parents:
- cc3e4d0 (diff), f522618 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Location:
- src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Common/PassVisitor.h
rcc3e4d0 rd33bc7c 253 253 } 254 254 255 class WithTypeSubstitution { 256 protected: 257 WithTypeSubstitution() = default; 258 ~WithTypeSubstitution() = default; 259 260 public: 261 TypeSubstitution * env; 262 }; 263 264 class WithStmtsToAdd { 265 protected: 266 WithStmtsToAdd() = default; 267 ~WithStmtsToAdd() = default; 268 269 public: 270 std::list< Statement* > stmtsToAddBefore; 271 std::list< Statement* > stmtsToAddAfter; 272 }; 273 274 class WithShortCircuiting { 275 protected: 276 WithShortCircuiting() = default; 277 ~WithShortCircuiting() = default; 278 279 public: 280 bool skip_children; 281 }; 282 283 class WithScopes { 284 protected: 285 WithScopes() = default; 286 ~WithScopes() = default; 287 288 public: 289 at_cleanup_t at_cleanup; 290 291 template< typename T > 292 void GuardValue( T& val ) { 293 at_cleanup( [ val ]( void * newVal ) { 294 * static_cast< T * >( newVal ) = val; 295 }, static_cast< void * >( & val ) ); 296 } 297 }; 298 299 255 300 #include "PassVisitor.impl.h" -
src/InitTweak/GenInit.cc
rcc3e4d0 rd33bc7c 44 44 } 45 45 46 class ReturnFixer {46 class ReturnFixer : public WithStmtsToAdd, public WithScopes { 47 47 public: 48 48 /// consistently allocates a temporary variable for the return value … … 53 53 void premutate( FunctionDecl *functionDecl ); 54 54 void premutate( ReturnStmt * returnStmt ); 55 56 at_cleanup_t at_cleanup;57 std::list< Statement * > stmtsToAddBefore;58 55 59 56 protected: … … 160 157 161 158 void ReturnFixer::premutate( FunctionDecl *functionDecl ) { 162 GuardValue( this,ftype );163 GuardValue( this,funcName );159 GuardValue( ftype ); 160 GuardValue( funcName ); 164 161 165 162 ftype = functionDecl->get_functionType();
Note: See TracChangeset
for help on using the changeset viewer.