Ignore:
Timestamp:
Nov 8, 2017, 5:43:33 PM (8 years ago)
Author:
Aaron Moss <a3moss@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
954908d
Parents:
78315272 (diff), e35f30a (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/SymTab/FixFunction.h

    r78315272 r3f7e12cb  
    1616#pragma once
    1717
    18 #include "SynTree/Mutator.h"  // for Mutator
    19 #include "SynTree/SynTree.h"  // for Types
     18#include "Common/PassVisitor.h" // for PassVisitor
     19#include "SynTree/SynTree.h"    // for Types
    2020
    2121namespace SymTab {
    2222        /// Replaces function and array types by equivalent pointer types.
    23         class FixFunction : public Mutator {
     23        class FixFunction : public WithShortCircuiting {
    2424                typedef Mutator Parent;
    2525          public:
    2626                FixFunction();
    2727
    28                 bool get_isVoid() const { return isVoid; }
    29                 void set_isVoid( bool newValue ) { isVoid = newValue; }
    30           private:
    31                 virtual DeclarationWithType* mutate(FunctionDecl *functionDecl);
     28                void premutate(FunctionDecl *functionDecl);
     29                DeclarationWithType* postmutate(FunctionDecl *functionDecl);
    3230
    33                 virtual Type* mutate(VoidType *voidType);
    34                 virtual Type* mutate(BasicType *basicType);
    35                 virtual Type* mutate(PointerType *pointerType);
    36                 virtual Type* mutate(ArrayType *arrayType);
    37                 virtual Type* mutate(StructInstType *aggregateUseType);
    38                 virtual Type* mutate(UnionInstType *aggregateUseType);
    39                 virtual Type* mutate(EnumInstType *aggregateUseType);
    40                 virtual Type* mutate(TraitInstType *aggregateUseType);
    41                 virtual Type* mutate(TypeInstType *aggregateUseType);
    42                 virtual Type* mutate(TupleType *tupleType);
    43                 virtual Type* mutate(VarArgsType *varArgsType);
    44                 virtual Type* mutate(ZeroType *zeroType);
    45                 virtual Type* mutate(OneType *oneType);
     31                Type * postmutate(ArrayType * arrayType);
     32
     33                void premutate(ArrayType * arrayType);
     34                void premutate(VoidType * voidType);
     35                void premutate(BasicType * basicType);
     36                void premutate(PointerType * pointerType);
     37                void premutate(StructInstType * aggregateUseType);
     38                void premutate(UnionInstType * aggregateUseType);
     39                void premutate(EnumInstType * aggregateUseType);
     40                void premutate(TraitInstType * aggregateUseType);
     41                void premutate(TypeInstType * aggregateUseType);
     42                void premutate(TupleType * tupleType);
     43                void premutate(VarArgsType * varArgsType);
     44                void premutate(ZeroType * zeroType);
     45                void premutate(OneType * oneType);
    4646
    4747                bool isVoid;
Note: See TracChangeset for help on using the changeset viewer.