All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
reference_attributes.h
Go to the documentation of this file.
1 #ifndef REFERENCE_ATTRIBUTES_H_INCLUDED_
2 #define REFERENCE_ATTRIBUTES_H_INCLUDED_
3 
4 #include "rose.h"
5 
6 #include "port_call_path.h"
7 #include <set>
8 #include <map>
9 
10 namespace risc {
11 
12 namespace sg {
13 
14 class FunctionParameterReferenceAttribute: public AstAttribute {
15 
16 public:
17 
18  // for the new rose release
19  virtual AstAttribute::OwnershipPolicy getOwnershipPolicy() const ROSE_OVERRIDE
20  {
21  return CONTAINER_OWNERSHIP;
22  }
23 
28  std::set<SgVariableSymbol*> mapped_variables_;
29 
34  std::map<PortCallPath, std::set<SgVariableSymbol*>> mapped_variables_with_pcp_;
35 };
36 
37 class LocalReferenceAttribute: public AstAttribute {
38 public:
39 
40  // for the new rose release
41  virtual AstAttribute::OwnershipPolicy getOwnershipPolicy() const ROSE_OVERRIDE
42  {
43  return CONTAINER_OWNERSHIP;
44  }
45 
50  SgVariableSymbol *mapped_variable_;
51 };
52 
53 } // end of namespace sg
54 
55 } // end of namespace risc
56 
57 #endif /* REFERENCE_ATTRIBUTES_H_INCLUDED_ */
58 
59 /* ex: set softtabstop=2 tabstop=2 shiftwidth=2 expandtab: */
std::map< PortCallPath, std::set< SgVariableSymbol * > > mapped_variables_with_pcp_
When the parameter is reached by this PortCallPath, then it should refer to the SgVariableSymbol is t...
Definition: reference_attributes.h:34
Definition: reference_attributes.h:14
virtual AstAttribute::OwnershipPolicy getOwnershipPolicy() const ROSE_OVERRIDE
Definition: reference_attributes.h:41
Definition: reference_attributes.h:37
std::set< SgVariableSymbol * > mapped_variables_
The actual variables that the reference function parameter really refers to.
Definition: reference_attributes.h:28
SgVariableSymbol * mapped_variable_
The actual variable that the reference function parameter really refers to.
Definition: reference_attributes.h:50
virtual AstAttribute::OwnershipPolicy getOwnershipPolicy() const ROSE_OVERRIDE
Definition: reference_attributes.h:19