Ignore:
Timestamp:
Apr 29, 2022, 3:10:23 PM (2 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, ast-experimental, master, pthread-emulation, qualifiedEnum
Children:
0c939dd
Parents:
111a2ab3 (diff), 298fe57 (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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Validate/GenericParameter.cpp

    r111a2ab3 r4cb1a24  
    1010// Created On       : Fri Mar 21 10:02:00 2022
    1111// Last Modified By : Andrew Beach
    12 // Last Modified On : Wed Apr 13 10:09:00 2022
    13 // Update Count     : 0
     12// Last Modified On : Fri Apr 22 16:43:00 2022
     13// Update Count     : 1
    1414//
    1515
     
    2222#include "AST/TranslationUnit.hpp"
    2323#include "AST/Type.hpp"
     24#include "Validate/NoIdSymbolTable.hpp"
    2425
    2526namespace Validate {
     
    138139// --------------------------------------------------------------------------
    139140
    140 // A SymbolTable that only has the operations used in the Translate Dimension
    141 // pass. More importantly, it doesn't have some methods that should no be
    142 // called by the Pass template (lookupId and addId).
    143 class NoIdSymbolTable {
    144         ast::SymbolTable base;
    145 public:
    146 #       define FORWARD_X( func, types_and_names, just_names ) \
    147         inline auto func types_and_names -> decltype( base.func just_names ) { \
    148                 return base.func just_names ; \
    149         }
    150 #       define FORWARD_0( func )         FORWARD_X( func, (),             () )
    151 #       define FORWARD_1( func, type )   FORWARD_X( func, (type arg),     (arg) )
    152 #       define FORWARD_2( func, t0, t1 ) FORWARD_X( func, (t0 a0, t1 a1), (a0, a1) )
    153 
    154         FORWARD_0( enterScope )
    155         FORWARD_0( leaveScope )
    156         FORWARD_1( lookupType, const std::string &        )
    157         FORWARD_1( addType   , const ast::NamedTypeDecl * )
    158         FORWARD_1( addStruct , const ast::StructDecl *    )
    159         FORWARD_1( addEnum   , const ast::EnumDecl *      )
    160         FORWARD_1( addUnion  , const ast::UnionDecl *     )
    161         FORWARD_1( addTrait  , const ast::TraitDecl *     )
    162         FORWARD_2( addWith   , const std::vector< ast::ptr<ast::Expr> > &, const ast::Decl * )
    163 };
    164 
    165 struct TranslateDimensionCore : public ast::WithGuards {
    166         NoIdSymbolTable symtab;
     141struct TranslateDimensionCore :
     142                public WithNoIdSymbolTable, public ast::WithGuards {
    167143
    168144        // SUIT: Struct- or Union- InstType
Note: See TracChangeset for help on using the changeset viewer.