Changeset 356bb95 for src/ResolvExpr/CastCost.cc
- Timestamp:
- Apr 15, 2016, 3:04:48 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:
- 385c130
- Parents:
- 29ad0ac (diff), 347c42f (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/ResolvExpr/CastCost.cc
r29ad0ac r356bb95 69 69 PointerType *destAsPointer = dynamic_cast< PointerType* >( dest ); 70 70 if ( destAsPointer && basicType->isInteger() ) { 71 // cost = Cost( 1, 0, 0 );72 cost = Cost ::infinity;71 // necessary for, e.g. unsigned long => void* 72 cost = Cost( 1, 0, 0 ); 73 73 } else { 74 74 ConversionCost::visit( basicType ); … … 89 89 } else if ( castResult < 0 ) { 90 90 cost = Cost::infinity; 91 //cost = Cost( 1, 0, 0 );92 91 } // if 93 92 } // if 94 93 } else if ( BasicType *destAsBasic = dynamic_cast< BasicType* >( dest ) ) { 95 94 if ( destAsBasic->isInteger() ) { 96 // cost = Cost( 1, 0, 0 );97 cost = Cost ::infinity;95 // necessary for, e.g. void* => unsigned long 96 cost = Cost( 1, 0, 0 ); 98 97 } // if 99 98 }
Note: See TracChangeset
for help on using the changeset viewer.