Changeset 96812c0
- Timestamp:
- May 29, 2018, 2:03:34 PM (7 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, with_gc
- Children:
- 054514d
- Parents:
- 3ed994e
- Location:
- src/SymTab
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SymTab/Indexer.cc
r3ed994e r96812c0 148 148 for ( auto decl : copy ) { 149 149 if ( FunctionDecl * function = dynamic_cast< FunctionDecl * >( decl.id ) ) { 150 std::list< DeclarationWithType * > & params = function-> get_functionType()->get_parameters();150 std::list< DeclarationWithType * > & params = function->type->parameters; 151 151 assert( ! params.empty() ); 152 152 // use base type of pointer, so that qualifiers on the pointer type aren't considered. … … 170 170 bool noUserDefinedFunc = ! val.existsUserDefinedFunc; 171 171 bool isUserDefinedFunc = ball.isUserDefinedFunc; 172 bool isAcceptableDefaultCtor = (! val.existsUserDefinedCtor || (! val.existsUserDefinedDefaultCtor && ball.decl.id-> get_linkage()== LinkageSpec::Intrinsic)) && ball.isDefaultCtor; // allow default constructors only when no user-defined constructors exist, except in the case of intrinsics, which require exact overrides172 bool isAcceptableDefaultCtor = (! val.existsUserDefinedCtor || (! val.existsUserDefinedDefaultCtor && ball.decl.id->linkage == LinkageSpec::Intrinsic)) && ball.isDefaultCtor; // allow default constructors only when no user-defined constructors exist, except in the case of intrinsics, which require exact overrides 173 173 bool isAcceptableCopyFunc = ! val.existsUserDefinedCopyFunc && ball.isCopyFunc; // handles copy ctor and assignment operator 174 174 bool isAcceptableDtor = ! val.existsUserDefinedDtor && ball.isDtor; -
src/SymTab/Mangler.cc
r3ed994e r96812c0 218 218 GuardValue( inFunctionType ); 219 219 inFunctionType = true; 220 std::list< Type* > returnTypes = getTypes( functionType-> get_returnVals());220 std::list< Type* > returnTypes = getTypes( functionType->returnVals ); 221 221 acceptAll( returnTypes, *visitor ); 222 222 mangleName << "_"; 223 std::list< Type* > paramTypes = getTypes( functionType-> get_parameters());223 std::list< Type* > paramTypes = getTypes( functionType->parameters ); 224 224 acceptAll( paramTypes, *visitor ); 225 225 mangleName << "_"; … … 229 229 printQualifiers( refType ); 230 230 231 mangleName << ( refType-> get_name().length() + prefix.length() ) << prefix << refType->get_name();231 mangleName << ( refType->name.length() + prefix.length() ) << prefix << refType->name; 232 232 233 233 if ( mangleGenericParams ) { 234 std::list< Expression* >& params = refType-> get_parameters();234 std::list< Expression* >& params = refType->parameters; 235 235 if ( ! params.empty() ) { 236 236 mangleName << "_"; 237 237 for ( std::list< Expression* >::const_iterator param = params.begin(); param != params.end(); ++param ) { 238 238 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 );239 assertf(paramType, "Aggregate parameters should be type expressions: %s", toCString(*param)); 240 maybeAccept( paramType->type, *visitor ); 241 241 } 242 242 mangleName << "_";
Note: See TracChangeset
for help on using the changeset viewer.