Changeset b21c77a for src/SymTab/Mangler.cc
- Timestamp:
- Jun 29, 2018, 4:14:15 PM (6 years ago)
- Branches:
- new-env
- Children:
- 184557e
- Parents:
- 97397a26 (diff), 28f3a19 (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/SymTab/Mangler.cc
r97397a26 rb21c77a 171 171 "w", // SignedInt128 172 172 "Uw", // UnsignedInt128 173 "x", // Float80 174 "y", // Float128 173 175 }; 176 static_assert( 177 sizeof(btLetter)/sizeof(btLetter[0]) == BasicType::NUMBER_OF_BASIC_TYPES, 178 "Each basic type kind should have a corresponding mangler letter" 179 ); 174 180 175 181 printQualifiers( basicType ); 182 assert( basicType->get_kind() < sizeof(btLetter)/sizeof(btLetter[0]) ); 176 183 mangleName << btLetter[ basicType->get_kind() ]; 177 184 } … … 218 225 GuardValue( inFunctionType ); 219 226 inFunctionType = true; 220 std::list< Type* > returnTypes = getTypes( functionType-> get_returnVals());227 std::list< Type* > returnTypes = getTypes( functionType->returnVals ); 221 228 acceptAll( returnTypes, *visitor ); 222 229 mangleName << "_"; 223 std::list< Type* > paramTypes = getTypes( functionType-> get_parameters());230 std::list< Type* > paramTypes = getTypes( functionType->parameters ); 224 231 acceptAll( paramTypes, *visitor ); 225 232 mangleName << "_"; … … 229 236 printQualifiers( refType ); 230 237 231 mangleName << ( refType-> get_name().length() + prefix.length() ) << prefix << refType->get_name();238 mangleName << ( refType->name.length() + prefix.length() ) << prefix << refType->name; 232 239 233 240 if ( mangleGenericParams ) { 234 std::list< Expression* >& params = refType-> get_parameters();241 std::list< Expression* >& params = refType->parameters; 235 242 if ( ! params.empty() ) { 236 243 mangleName << "_"; 237 244 for ( std::list< Expression* >::const_iterator param = params.begin(); param != params.end(); ++param ) { 238 245 TypeExpr *paramType = dynamic_cast< TypeExpr* >( *param ); 239 assertf(paramType, "Aggregate parameters should be type expressions: %s", to String(*param).c_str());240 maybeAccept( paramType-> get_type(), *visitor );246 assertf(paramType, "Aggregate parameters should be type expressions: %s", toCString(*param)); 247 maybeAccept( paramType->type, *visitor ); 241 248 } 242 249 mangleName << "_";
Note: See TracChangeset
for help on using the changeset viewer.