Changeset 6f72453 for src/SymTab


Ignore:
Timestamp:
Jul 11, 2016, 5:25:12 PM (9 years ago)
Author:
Thierry Delisle <tdelisle@…>
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:
1b8c156, 7d5e243
Parents:
c0588909 (diff), 919d1ba (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 plg.uwaterloo.ca:software/cfa/cfa-cc

Location:
src/SymTab
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/SymTab/Autogen.cc

    rc0588909 r6f72453  
    8484                }
    8585
    86                 *out++ = new ExprStmt( noLabels, fExpr );
     86                Statement * callStmt = new ExprStmt( noLabels, fExpr );
     87                if ( (fname == "?{}" || fname == "^?{}") && ( !obj || ( obj && obj->get_bitfieldWidth() == NULL ) ) ) {
     88                        // implicitly generated ctor/dtor calls should be wrapped
     89                        // so that later passes are aware they were generated.
     90                        // xxx - don't mark as an implicit ctor/dtor if obj is a bitfield,
     91                        // because this causes the address to be taken at codegen, which is illegal in C.
     92                        callStmt = new ImplicitCtorDtorStmt( callStmt );
     93                }
     94                *out++ = callStmt;
    8795        }
    8896
     
    244252                                }
    245253
    246                                 if ( type->get_qualifiers().isConst ) {
    247                                         // don't assign const members
     254                                if ( type->get_qualifiers().isConst && func->get_name() == "?=?" ) {
     255                                        // don't assign const members, but do construct/destruct
    248256                                        continue;
    249257                                }
  • src/SymTab/Autogen.h

    rc0588909 r6f72453  
    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.