Changeset a065f1f for src/GenPoly


Ignore:
Timestamp:
Sep 20, 2022, 8:37:17 PM (3 years ago)
Author:
JiadaL <j82liang@…>
Branches:
ADT, ast-experimental, master, pthread-emulation, stuck-waitfor-destruct
Children:
53a768d
Parents:
4520b77e (diff), ef1da0e2 (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/GenPoly
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/GenPoly/InstantiateGenericNew.cpp

    r4520b77e ra065f1f  
    2222
    2323#include "AST/Copy.hpp"                // for deepCopy
     24#include "AST/Create.hpp"              // for asForward
    2425#include "AST/Pass.hpp"                // for Pass, WithGuard, WithShortCi...
    2526#include "AST/TranslationUnit.hpp"     // for TranslationUnit
     
    255256void stripInstParams( ast::BaseInstType * inst ) {
    256257        inst->params.clear();
    257 }
    258 
    259 // TODO: I think this should become a generic helper.
    260 template<typename Aggr>
    261 Aggr * asForward( Aggr const * decl ) {
    262         if ( !decl->body ) {
    263                 return nullptr;
    264         }
    265         Aggr * mut = ast::deepCopy( decl );
    266         mut->body = false;
    267         mut->members.clear();
    268         return mut;
    269258}
    270259
     
    553542                        // Forward declare before recursion. (TODO: Only when needed, #199.)
    554543                        insert( inst, typeSubs, newDecl );
    555                         if ( AggrDecl const * forwardDecl = asForward( newDecl ) ) {
     544                        if ( AggrDecl const * forwardDecl = ast::asForward( newDecl ) ) {
    556545                                declsToAddBefore.push_back( forwardDecl );
    557546                        }
  • src/GenPoly/Lvalue2.cc

    r4520b77e ra065f1f  
    2323}
    2424
    25 
    2625}
Note: See TracChangeset for help on using the changeset viewer.