ROSE  0.11.145.0
Utils.h
1 #ifndef ROSE_AST_Utils_H
2 #define ROSE_AST_Utils_H
3 
4 #include <iostream>
5 #include <map>
6 #include <ostream>
7 
8 class SgNode;
9 
10 namespace Rose {
11 namespace AST {
12 
14 namespace Utils {
15 
16 using replacement_map_t = std::map<SgNode *, SgNode *>;
17 
19 void edgePointerReplacement(replacement_map_t const &);
20 
22 void edgePointerReplacement(SgNode * root, replacement_map_t const &);
23 
24 
32 bool checkParentPointers(SgNode *root, std::ostream &out = std::cerr);
33 
49 void repairParentPointers(SgNode *root);
50 
51 } } }
52 
53 #endif
Main namespace for the ROSE library.
void edgePointerReplacement(replacement_map_t const &)
For all nodes in the memory pool, it looks for the edges in the replacement map. If a match is found ...
bool checkParentPointers(SgNode *root, std::ostream &out=std::cerr)
Check that all parent pointers in the specified subtree are correct.
This class represents the base class for all IR nodes within Sage III.
Definition: Cxx_Grammar.h:9846
void repairParentPointers(SgNode *root)
Set parent pointers based on child pointers in a subtree.