Changeset b96ec83 for src/InitTweak/InitTweak.cc
- Timestamp:
- Oct 3, 2017, 5:12:35 PM (6 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, cleanup-dtors, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 6840e7c
- Parents:
- 1bc749f (diff), b0f601fa (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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/InitTweak/InitTweak.cc
r1bc749f rb96ec83 270 270 } 271 271 272 Type * getThisType( FunctionType * ftype ) { 273 assertf( ftype, "getThisType: nullptr ftype" ); 274 ObjectDecl * thisParam = getThisParam( ftype ); 275 ReferenceType * refType = strict_dynamic_cast< ReferenceType * >( thisParam->type ); 276 return refType->base; 277 } 278 279 ObjectDecl * getThisParam( FunctionType * ftype ) { 280 assertf( ftype, "getThisParam: nullptr ftype" ); 281 auto & params = ftype->parameters; 282 assertf( ! params.empty(), "getThisParam: ftype with 0 parameters: %s", toString( ftype ).c_str() ); 283 return strict_dynamic_cast< ObjectDecl * >( params.front() ); 284 } 285 272 286 bool tryConstruct( DeclarationWithType * dwt ) { 273 287 ObjectDecl * objDecl = dynamic_cast< ObjectDecl * >( dwt );
Note: See TracChangeset
for help on using the changeset viewer.