Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SymTab/FixFunction.h

    r6b0b624 r954ef5b  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // FixFunction.h -- 
     7// FixFunction.h --
    88//
    99// Author           : Richard C. Bilson
     
    1616#pragma once
    1717
    18 #include "SynTree/Mutator.h"
     18#include "Common/PassVisitor.h" // for PassVisitor
     19#include "SynTree/SynTree.h"    // for Types
    1920
    2021namespace SymTab {
    2122        /// Replaces function and array types by equivalent pointer types.
    22         class FixFunction : public Mutator {
     23        class FixFunction : public WithShortCircuiting {
    2324                typedef Mutator Parent;
    2425          public:
    2526                FixFunction();
    2627
    27                 bool get_isVoid() const { return isVoid; }
    28                 void set_isVoid( bool newValue ) { isVoid = newValue; }
    29           private:
    30                 virtual DeclarationWithType* mutate(FunctionDecl *functionDecl);
     28                void premutate(FunctionDecl *functionDecl);
     29                DeclarationWithType* postmutate(FunctionDecl *functionDecl);
    3130
    32                 virtual Type* mutate(VoidType *voidType);
    33                 virtual Type* mutate(BasicType *basicType);
    34                 virtual Type* mutate(PointerType *pointerType);
    35                 virtual Type* mutate(ArrayType *arrayType);
    36                 virtual Type* mutate(StructInstType *aggregateUseType);
    37                 virtual Type* mutate(UnionInstType *aggregateUseType);
    38                 virtual Type* mutate(EnumInstType *aggregateUseType);
    39                 virtual Type* mutate(TraitInstType *aggregateUseType);
    40                 virtual Type* mutate(TypeInstType *aggregateUseType);
    41                 virtual Type* mutate(TupleType *tupleType);
    42                 virtual Type* mutate(VarArgsType *varArgsType);
    43                 virtual Type* mutate(ZeroType *zeroType);
    44                 virtual Type* mutate(OneType *oneType);
    45  
     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);
     46
    4647                bool isVoid;
    4748        };
Note: See TracChangeset for help on using the changeset viewer.