Changeset e4d3ceb for src/SymTab


Ignore:
Timestamp:
Jul 12, 2016, 6:34:33 PM (9 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, 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:
5479e63
Parents:
4e06c1e (diff), e67f54c (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.
Message:

Merge branch 'master' of plg2:software/cfa/cfa-cc

Location:
src/SymTab
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/SymTab/Autogen.cc

    r4e06c1e re4d3ceb  
    8282                }
    8383
    84                 *out++ = new ExprStmt( noLabels, fExpr );
     84                Statement * callStmt = new ExprStmt( noLabels, fExpr );
     85                if ( (fname == "?{}" || fname == "^?{}") && ( !obj || ( obj && obj->get_bitfieldWidth() == NULL ) ) ) {
     86                        // implicitly generated ctor/dtor calls should be wrapped
     87                        // so that later passes are aware they were generated.
     88                        // xxx - don't mark as an implicit ctor/dtor if obj is a bitfield,
     89                        // because this causes the address to be taken at codegen, which is illegal in C.
     90                        callStmt = new ImplicitCtorDtorStmt( callStmt );
     91                }
     92                *out++ = callStmt;
    8593        }
    8694
     
    242250                                }
    243251
    244                                 if ( type->get_qualifiers().isConst ) {
    245                                         // don't assign const members
     252                                if ( type->get_qualifiers().isConst && func->get_name() == "?=?" ) {
     253                                        // don't assign const members, but do construct/destruct
    246254                                        continue;
    247255                                }
  • src/SymTab/Autogen.h

    r4e06c1e re4d3ceb  
    9191    block->get_kids().push_back( new DeclStmt( noLabels, index ) );
    9292    block->get_kids().push_back( new ForStmt( noLabels, initList, cond, inc, new ExprStmt( noLabels, fExpr ) ) );
    93     *out++ = block;
     93
     94    Statement * stmt = block;
     95    if ( fname == "?{}" || fname == "^?{}" ) {
     96      // implicitly generated ctor/dtor calls should be wrapped
     97      // so that later passes are aware they were generated
     98      stmt = new ImplicitCtorDtorStmt( stmt );
     99    }
     100    *out++ = stmt;
    94101  }
    95102} // namespace SymTab
Note: See TracChangeset for help on using the changeset viewer.