Changes in src/SymTab/Autogen.cc [2e3a379:9554d9b]
- File:
-
- 1 edited
-
src/SymTab/Autogen.cc (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/SymTab/Autogen.cc
r2e3a379 r9554d9b 10 10 // Created On : Thu Mar 03 15:45:56 2016 11 11 // Last Modified By : Rob Schluntz 12 // Last Modified On : T ue May 03 16:56:21201612 // Last Modified On : Thu May 26 14:14:09 2016 13 13 // Update Count : 1 14 14 // … … 163 163 /// Creates a new type decl that's the same as src, but renamed and with only the ?=?, ?{} (default and copy), and ^?{} assertions (for complete types only) 164 164 TypeDecl *cloneAndRename( TypeDecl *src, const std::string &name ) { 165 // TypeDecl *dst = new TypeDecl( name, src->get_storageClass(), 0, src->get_kind() ); 166 167 // if ( src->get_kind() == TypeDecl::Any ) { 168 // TypeInstType *opParamType = new TypeInstType( Type::Qualifiers(), name, dst ); 169 // FunctionType *opFunctionType = new FunctionType( Type::Qualifiers(), false ); 170 // opFunctionType->get_parameters().push_back( 171 // new ObjectDecl( "", DeclarationNode::NoStorageClass, LinkageSpec::Cforall, 0, new PointerType( Type::Qualifiers(), opParamType->clone() ), 0 ) ); 172 // FunctionDecl *ctorAssert = new FunctionDecl( "?{}", DeclarationNode::NoStorageClass, LinkageSpec::Cforall, opFunctionType->clone(), 0, false, false ); 173 // FunctionDecl *dtorAssert = new FunctionDecl( "^?{}", DeclarationNode::NoStorageClass, LinkageSpec::Cforall, opFunctionType->clone(), 0, false, false ); 174 175 // opFunctionType->get_parameters().push_back( 176 // new ObjectDecl( "", DeclarationNode::NoStorageClass, LinkageSpec::Cforall, 0, opParamType, 0 ) ); 177 // FunctionDecl *copyCtorAssert = new FunctionDecl( "?{}", DeclarationNode::NoStorageClass, LinkageSpec::Cforall, opFunctionType->clone(), 0, false, false ); 178 179 // opFunctionType->get_returnVals().push_back( 180 // new ObjectDecl( "", DeclarationNode::NoStorageClass, LinkageSpec::Cforall, 0, opParamType->clone(), 0 ) ); 181 // FunctionDecl *assignAssert = new FunctionDecl( "?=?", DeclarationNode::NoStorageClass, LinkageSpec::Cforall, opFunctionType, 0, false, false ); 182 183 184 // dst->get_assertions().push_back( assignAssert ); 185 // dst->get_assertions().push_back( ctorAssert ); 186 // dst->get_assertions().push_back( dtorAssert ); 187 // dst->get_assertions().push_back( copyCtorAssert ); 188 // } 189 165 190 TypeDecl *dst = new TypeDecl( src->get_name(), src->get_storageClass(), 0, src->get_kind() ); 166 191 cloneAll(src->get_assertions(), dst->get_assertions()); … … 217 242 if ( type->get_qualifiers().isConst ) { 218 243 // don't assign const members 244 continue; 245 } 246 247 if ( field->get_name() == "" ) { 248 // don't assign to anonymous members 249 // xxx - this is a temporary fix. Anonymous members tie into 250 // our inheritance model. I think the correct way to handle this is to 251 // cast the structure to the type of the member and let the resolver 252 // figure out whether it's valid and have a pass afterwards that fixes 253 // the assignment to use pointer arithmetic with the offset of the 254 // member, much like how generic type members are handled. 219 255 continue; 220 256 } … … 317 353 if ( isUnnamedBitfield( dynamic_cast< ObjectDecl * > ( member ) ) ) { 318 354 // don't make a function whose parameter is an unnamed bitfield 355 continue; 356 } else if ( member->get_name() == "" ) { 357 // don't assign to anonymous members 358 // xxx - this is a temporary fix. Anonymous members tie into 359 // our inheritance model. I think the correct way to handle this is to 360 // cast the structure to the type of the member and let the resolver 361 // figure out whether it's valid and have a pass afterwards that fixes 362 // the assignment to use pointer arithmetic with the offset of the 363 // member, much like how generic type members are handled. 319 364 continue; 320 365 }
Note:
See TracChangeset
for help on using the changeset viewer.