ADTaaron-thesisarm-ehast-experimentalcleanup-dtorsdeferred_resndemanglerenumforall-pointer-decayjacob/cs343-translationjenkins-sandboxnew-astnew-ast-unique-exprnew-envno_listpersistent-indexerpthread-emulationqualifiedEnumresolv-newwith_gc
Last change
on this file since cc344be was
954ef5b,
checked in by Rob Schluntz <rschlunt@…>, 7 years ago
|
Fix array-to-pointer decay to only decay one level
|
-
Property mode set to
100644
|
File size:
1.6 KB
|
Line | |
---|
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 | // |
---|
7 | // FixFunction.h -- |
---|
8 | // |
---|
9 | // Author : Richard C. Bilson |
---|
10 | // Created On : Sun May 17 17:02:08 2015 |
---|
11 | // Last Modified By : Peter A. Buhr |
---|
12 | // Last Modified On : Sat Jul 22 09:45:55 2017 |
---|
13 | // Update Count : 4 |
---|
14 | // |
---|
15 | |
---|
16 | #pragma once |
---|
17 | |
---|
18 | #include "Common/PassVisitor.h" // for PassVisitor |
---|
19 | #include "SynTree/SynTree.h" // for Types |
---|
20 | |
---|
21 | namespace SymTab { |
---|
22 | /// Replaces function and array types by equivalent pointer types. |
---|
23 | class FixFunction : public WithShortCircuiting { |
---|
24 | typedef Mutator Parent; |
---|
25 | public: |
---|
26 | FixFunction(); |
---|
27 | |
---|
28 | void premutate(FunctionDecl *functionDecl); |
---|
29 | DeclarationWithType* postmutate(FunctionDecl *functionDecl); |
---|
30 | |
---|
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 | |
---|
47 | bool isVoid; |
---|
48 | }; |
---|
49 | } // namespace SymTab |
---|
50 | |
---|
51 | // Local Variables: // |
---|
52 | // tab-width: 4 // |
---|
53 | // mode: c++ // |
---|
54 | // compile-command: "make install" // |
---|
55 | // End: // |
---|
Note: See
TracBrowser
for help on using the repository browser.