ADTaaron-thesisarm-ehast-experimentalcleanup-dtorsdeferred_resndemanglerenumforall-pointer-decayjacob/cs343-translationjenkins-sandboxnew-astnew-ast-unique-exprnew-envno_listpersistent-indexerpthread-emulationqualifiedEnumwith_gc
Last change
on this file since ce28c7b was
4bda2cf,
checked in by Rob Schluntz <rschlunt@…>, 7 years ago
|
Refactor FixFunction?, add error for void foo(void, ...)
|
-
Property mode set to
100644
|
File size:
1.6 KB
|
Rev | Line | |
---|
[0dd3a2f] | 1 | // |
---|
| 2 | // Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo |
---|
| 3 | // |
---|
| 4 | // The contents of this file are covered under the licence agreement in the |
---|
| 5 | // file "LICENCE" distributed with Cforall. |
---|
| 6 | // |
---|
[30f9072] | 7 | // FixFunction.h -- |
---|
[0dd3a2f] | 8 | // |
---|
| 9 | // Author : Richard C. Bilson |
---|
| 10 | // Created On : Sun May 17 17:02:08 2015 |
---|
| 11 | // Last Modified By : Peter A. Buhr |
---|
[6b0b624] | 12 | // Last Modified On : Sat Jul 22 09:45:55 2017 |
---|
| 13 | // Update Count : 4 |
---|
[0dd3a2f] | 14 | // |
---|
| 15 | |
---|
[6b0b624] | 16 | #pragma once |
---|
[51b7345] | 17 | |
---|
[21b7161] | 18 | #include "Common/PassVisitor.h" // for PassVisitor |
---|
| 19 | #include "SynTree/SynTree.h" // for Types |
---|
[51b7345] | 20 | |
---|
| 21 | namespace SymTab { |
---|
[82dd287] | 22 | /// Replaces function and array types by equivalent pointer types. |
---|
[21b7161] | 23 | class FixFunction : public WithShortCircuiting { |
---|
[0dd3a2f] | 24 | typedef Mutator Parent; |
---|
| 25 | public: |
---|
| 26 | FixFunction(); |
---|
| 27 | |
---|
[21b7161] | 28 | void premutate(FunctionDecl *functionDecl); |
---|
| 29 | DeclarationWithType* postmutate(FunctionDecl *functionDecl); |
---|
| 30 | |
---|
| 31 | Type * postmutate(ArrayType * arrayType); |
---|
| 32 | |
---|
[954ef5b] | 33 | void premutate(ArrayType * arrayType); |
---|
[21b7161] | 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); |
---|
[30f9072] | 46 | |
---|
[0dd3a2f] | 47 | bool isVoid; |
---|
| 48 | }; |
---|
[4bda2cf] | 49 | |
---|
| 50 | bool fixFunction( DeclarationWithType *& ); |
---|
[51b7345] | 51 | } // namespace SymTab |
---|
| 52 | |
---|
[0dd3a2f] | 53 | // Local Variables: // |
---|
| 54 | // tab-width: 4 // |
---|
| 55 | // mode: c++ // |
---|
| 56 | // compile-command: "make install" // |
---|
| 57 | // End: // |
---|
Note: See
TracBrowser
for help on using the repository browser.