Changeset 189243c for src/GenPoly
- Timestamp:
- May 13, 2016, 2:55:44 PM (9 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:
- 2b46a13, a8616147
- Parents:
- 102b0cd (diff), cc3528f (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/GenPoly/Box.cc
r102b0cd r189243c 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Rob Schluntz 12 // Last Modified On : Tue May 03 16:44:47201612 // Last Modified On : Fri May 13 14:51:21 2016 13 13 // Update Count : 295 14 14 // … … 1037 1037 std::list< DeclarationWithType *>::iterator param = adapterType->get_parameters().begin(); 1038 1038 std::list< DeclarationWithType *>::iterator realParam = adaptee->get_parameters().begin(); 1039 param++; // skip adaptee parameter 1039 param++; // skip adaptee parameter in the adapter type 1040 1040 if ( realType->get_returnVals().empty() ) { 1041 // void return 1041 1042 addAdapterParams( adapteeApp, arg, param, adapterType->get_parameters().end(), realParam, tyVars ); 1042 1043 bodyStmt = new ExprStmt( noLabels, adapteeApp ); 1043 1044 } else if ( isPolyType( adaptee->get_returnVals().front()->get_type(), tyVars ) ) { 1045 // return type T 1044 1046 if ( (*param)->get_name() == "" ) { 1045 1047 (*param)->set_name( "_ret" ); … … 2069 2071 if ( n_members == 0 ) { 2070 2072 // all empty structs have the same layout - size 1, align 1 2071 makeVar( sizeofName( typeName ), layoutType, new SingleInit( new ConstantExpr( Constant::from_ulong( 1 ) ) ) );2072 makeVar( alignofName( typeName ), layoutType->clone(), new SingleInit( new ConstantExpr( Constant::from_ulong( 1 ) ) ) );2073 makeVar( sizeofName( typeName ), layoutType, new SingleInit( new ConstantExpr( Constant::from_ulong( (unsigned long)1 ) ) ) ); 2074 makeVar( alignofName( typeName ), layoutType->clone(), new SingleInit( new ConstantExpr( Constant::from_ulong( (unsigned long)1 ) ) ) ); 2073 2075 // NOTE zero-length arrays are forbidden in C, so empty structs have no offsetof array 2074 2076 } else {
Note: See TracChangeset
for help on using the changeset viewer.