Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ResolvExpr/ConversionCost.cc

    r843054c2 ra436947  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // ConversionCost.cc -- 
     7// ConversionCost.cc --
    88//
    99// Author           : Richard C. Bilson
    1010// Created On       : Sun May 17 07:06:19 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sun May 17 07:22:19 2015
    13 // Update Count     : 4
     12// Last Modified On : Wed Mar  2 17:35:46 2016
     13// Update Count     : 6
    1414//
    1515
     
    157157                                cost = Cost( 0, 0, tableResult );
    158158                        } // if
    159                 } // if
     159                } else if ( dynamic_cast< EnumInstType *>( dest ) ) {
     160                        // xxx - not positive this is correct, but appears to allow casting int => enum
     161                        cost = Cost( 1, 0, 0 );
     162    } // if
    160163        }
    161164
     
    206209        }
    207210
    208         void ConversionCost::visit(ContextInstType *inst) {
     211        void ConversionCost::visit(TraitInstType *inst) {
    209212        }
    210213
     
    247250                } // if
    248251        }
     252
     253        void ConversionCost::visit(VarArgsType *varArgsType) {
     254                if ( dynamic_cast< VarArgsType* >( dest ) ) {
     255                        cost = Cost::zero;
     256                }
     257        }
    249258} // namespace ResolvExpr
    250259
Note: See TracChangeset for help on using the changeset viewer.