Changes in src/InitTweak/InitTweak.cc [335d81f:6f096d2]
- File:
-
- 1 edited
-
src/InitTweak/InitTweak.cc (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/InitTweak/InitTweak.cc
r335d81f r6f096d2 9 9 // Author : Rob Schluntz 10 10 // Created On : Fri May 13 11:26:36 2016 11 // Last Modified By : A ndrew Beach12 // Last Modified On : Fri Jun 19 14:34:00 201913 // Update Count : 611 // Last Modified By : Aaron B. Moss 12 // Last Modified On : Mon Jun 10 13:30:00 2019 13 // Update Count : 5 14 14 // 15 15 … … 633 633 return nullptr; 634 634 } 635 636 DeclarationWithType * getFunctionCore( const Expression * expr ) {637 if ( const auto * appExpr = dynamic_cast< const ApplicationExpr * >( expr ) ) {638 return getCalledFunction( appExpr->function );639 } else if ( const auto * untyped = dynamic_cast< const UntypedExpr * >( expr ) ) {640 return getCalledFunction( untyped->function );641 }642 assertf( false, "getFunction with unknown expression: %s", toString( expr ).c_str() );643 }644 635 } 645 636 646 637 DeclarationWithType * getFunction( Expression * expr ) { 647 return getFunctionCore( expr ); 648 } 649 650 const DeclarationWithType * getFunction( const Expression * expr ) { 651 return getFunctionCore( expr ); 638 if ( ApplicationExpr * appExpr = dynamic_cast< ApplicationExpr * >( expr ) ) { 639 return getCalledFunction( appExpr->get_function() ); 640 } else if ( UntypedExpr * untyped = dynamic_cast< UntypedExpr * > ( expr ) ) { 641 return getCalledFunction( untyped->get_function() ); 642 } 643 assertf( false, "getFunction received unknown expression: %s", toString( expr ).c_str() ); 652 644 } 653 645
Note:
See TracChangeset
for help on using the changeset viewer.