Changeset 957453d for src/GenPoly/Box.cc
- Timestamp:
- Jul 20, 2017, 2:05:44 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, resolv-new, with_gc
- Children:
- c72f9fd
- Parents:
- d49bfa8 (diff), 8b28a52 (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
rd49bfa8 r957453d 202 202 }; 203 203 204 /// Replaces initialization of polymorphic values with alloca, declaration of dtype/ftype with appropriate void expression, and sizeof expressions of polymorphic types with the proper variable204 /// Replaces initialization of polymorphic values with alloca, declaration of dtype/ftype with appropriate void expression, sizeof expressions of polymorphic types with the proper variable, and strips fields from generic struct declarations. 205 205 class Pass3 final : public PolyMutator { 206 206 public: … … 210 210 using PolyMutator::mutate; 211 211 virtual DeclarationWithType *mutate( FunctionDecl *functionDecl ) override; 212 virtual Declaration *mutate( StructDecl *structDecl ) override; 213 virtual Declaration *mutate( UnionDecl *unionDecl ) override; 212 214 virtual ObjectDecl *mutate( ObjectDecl *objectDecl ) override; 213 215 virtual TypedefDecl *mutate( TypedefDecl *objectDecl ) override; … … 1868 1870 } 1869 1871 1872 /// Strips the members from a generic aggregate 1873 void stripGenericMembers(AggregateDecl* decl) { 1874 if ( ! decl->get_parameters().empty() ) decl->get_members().clear(); 1875 } 1876 1877 Declaration *Pass3::mutate( StructDecl *structDecl ) { 1878 stripGenericMembers( structDecl ); 1879 return structDecl; 1880 } 1881 1882 Declaration *Pass3::mutate( UnionDecl *unionDecl ) { 1883 stripGenericMembers( unionDecl ); 1884 return unionDecl; 1885 } 1886 1870 1887 TypeDecl * Pass3::mutate( TypeDecl *typeDecl ) { 1871 1888 // Initializer *init = 0;
Note: See TracChangeset
for help on using the changeset viewer.