ROSE  0.11.145.0
sageGeneric.h
Go to the documentation of this file.
1 #ifndef _SAGEGENERIC_H
2 
3 #define _SAGEGENERIC_H 1
4 
11 
12 // note: the comments are right aligned to support code-blocks doxygen 1.3.X :)
13 
14 #include <type_traits>
15 
16 #if !defined(NDEBUG)
17 #include <typeinfo>
18 #include <sstream>
19 #endif /* NDEBUG */
20 
21 #define WITH_BINARY_NODES 0
22 #define WITH_UNTYPED_NODES 0
23 
24 // #include "Cxx_Grammar.h"
25 
26 // DQ (10/5/2014): We can't include this here.
27 // #include "rose.h"
28 
29 #define SG_UNEXPECTED_NODE(X) (sg::unexpected_node(X, __FILE__, __LINE__))
30 #define SG_DEREF(X) (sg::deref(X, __FILE__, __LINE__))
31 #define SG_ASSERT_TYPE(SAGENODE, N) (sg::assert_sage_type<SAGENODE>(N, __FILE__, __LINE__))
32 #define SG_ERROR_IF(COND, MSG) (sg::report_error_if(COND, MSG, __FILE__, __LINE__))
33 
34 
36 namespace sg
37 {
38  //
39  // non sage specific utilities
40 
43  template <class T>
44  static inline
45  void unused(const T&) {}
46 
48  template <class T1, class T2>
49  struct ConstLike
50  {
51  typedef T2 type;
52  };
53 
54  template <class T1, class T2>
55  struct ConstLike<const T1, T2>
56  {
57  typedef const T2 type;
58  };
59 
60  //
61  // error reporting
62 
64  template <class T, class E>
65  static inline
66  T conv(const E& el)
67  {
68  T res;
69 #if !defined(NDEBUG)
70  std::stringstream s;
71 
72  s << el;
73  s >> res;
74 #endif /* NDEBUG */
75  return res;
76  }
77 
78  // \note implemented in SageInterfaceAda.h
79  // \{
80  [[noreturn]]
81  void report_error(std::string desc, const char* file = nullptr, size_t ln = 0);
82 
83  [[noreturn]]
84  void unexpected_node(const SgNode& n, const char* file = nullptr, size_t ln = 0);
86 
87 
88  static inline
89  void report_error_if(bool iserror, const std::string& desc, const char* file = nullptr, size_t ln = 0)
90  {
91  if (!iserror) return;
92 
93  report_error(desc, file, ln);
94  }
95 
97  template <class T>
98  T& deref(T* ptr, const char* file = 0, size_t ln = 0)
99  {
100  report_error_if(!ptr, "assertion failed: null dereference ", file, ln);
101  return *ptr;
102  }
103 
104  // \note implemented in SageInterfaceAda.h
105 
116  template <class _ReturnType>
118  {
119  typedef _ReturnType ReturnType;
121 
123  : res()
124  {}
125 
126  explicit
127  DispatchHandler(const ReturnType& defaultval)
128  : res(defaultval)
129  {}
130 
131  operator ReturnType() const { return res; }
132 
133  protected:
134  ReturnType res;
135  };
136 
137 
138  //
139  // Sage query functions
140 
142  template <class SageNode>
143  static inline
144  SageNode& assume_sage_type(SgNode& n)
145  {
146  return static_cast<SageNode&>(n);
147  }
148 
151  template <class SageNode>
152  static inline
153  const SageNode& assume_sage_type(const SgNode& n)
154  {
155  return static_cast<const SageNode&>(n);
156  }
157 
158 #define GEN_VISIT(X) \
159  void visit(X * n) { rv.handle(*n); }
160 
161  template <class RoseVisitor>
163  {
164  // rvalue ctor
165  VisitDispatcher(RoseVisitor&& rosevisitor, std::false_type)
166  : rv(std::move(rosevisitor))
167  {}
168 
169  // lvalue ctor
170  VisitDispatcher(const RoseVisitor& rosevisitor, std::true_type)
171  : rv(rosevisitor)
172  {}
173 
174  GEN_VISIT(SgAccessModifier)
175  GEN_VISIT(SgActualArgumentExpression)
176  GEN_VISIT(SgAbsOp)
177  GEN_VISIT(SgAdaAccessType)
178  GEN_VISIT(SgAdaAcceptStmt)
179  GEN_VISIT(SgAdaComponentClause)
180  GEN_VISIT(SgAdaDelayStmt)
181  GEN_VISIT(SgAdaEntryDecl)
182  GEN_VISIT(SgAdaExitStmt)
183  GEN_VISIT(SgAdaDiscreteType)
184  GEN_VISIT(SgAdaFloatVal)
185  GEN_VISIT(SgAdaFormalType)
186  GEN_VISIT(SgAdaFormalTypeDecl)
187  GEN_VISIT(SgAdaFunctionRenamingDecl)
188  GEN_VISIT(SgAdaGenericDecl)
189  GEN_VISIT(SgAdaGenericInstanceDecl)
190  GEN_VISIT(SgAdaGenericDefn)
191  GEN_VISIT(SgAdaIndexConstraint)
192  GEN_VISIT(SgAdaAttributeClause)
193  GEN_VISIT(SgAdaLoopStmt)
194  GEN_VISIT(SgAdaModularType)
195  GEN_VISIT(SgAdaPackageBody)
196  GEN_VISIT(SgAdaPackageBodyDecl)
197  GEN_VISIT(SgAdaPackageSpec)
198  GEN_VISIT(SgAdaPackageSpecDecl)
199  GEN_VISIT(SgAdaPackageSymbol)
200  GEN_VISIT(SgAdaRangeConstraint)
201  GEN_VISIT(SgAdaRepresentationClause)
203  GEN_VISIT(SgAdaRenamingDecl)
204  GEN_VISIT(SgAdaSelectStmt)
205  GEN_VISIT(SgAdaSelectAlternativeStmt)
206  GEN_VISIT(SgAdaSubtype)
207  GEN_VISIT(SgAdaDerivedType)
208  GEN_VISIT(SgAdaAttributeExp)
209  GEN_VISIT(SgAdaTaskBody)
210  GEN_VISIT(SgAdaTaskBodyDecl)
211  GEN_VISIT(SgAdaTaskSpec)
212  GEN_VISIT(SgAdaTaskSpecDecl)
213  GEN_VISIT(SgAdaTaskSymbol)
214  GEN_VISIT(SgAdaRenamingSymbol)
215  GEN_VISIT(SgAdaTaskRefExp)
216  GEN_VISIT(SgAdaRenamingRefExp)
217  GEN_VISIT(SgAdaTaskType)
218  GEN_VISIT(SgAdaTaskTypeDecl)
219  GEN_VISIT(SgAdaTerminateStmt)
220  GEN_VISIT(SgAdaTypeConstraint)
221  GEN_VISIT(SgAddOp)
222  GEN_VISIT(SgAddressOfOp)
223  GEN_VISIT(SgAggregateInitializer)
224  GEN_VISIT(SgAliasSymbol)
225  GEN_VISIT(SgAllocateStatement)
226  GEN_VISIT(SgAndAssignOp)
227  GEN_VISIT(SgAndOp)
228  GEN_VISIT(SgArithmeticIfStatement)
229  GEN_VISIT(SgArrayType)
230  GEN_VISIT(SgArrowExp)
231  GEN_VISIT(SgArrowStarOp)
232  GEN_VISIT(SgAssertStmt)
233  GEN_VISIT(SgAssignInitializer)
234  GEN_VISIT(SgAssignOp)
235  GEN_VISIT(SgAssignStatement)
236  GEN_VISIT(SgAssignedGotoStatement)
237  GEN_VISIT(SgAssociateStatement)
238  GEN_VISIT(SgAsteriskShapeExp)
239  GEN_VISIT(SgAtOp)
240  GEN_VISIT(SgAttribute)
242  GEN_VISIT(SgAutoType)
243  GEN_VISIT(SgAwaitExpression)
244  GEN_VISIT(SgBackspaceStatement)
245  GEN_VISIT(SgBaseClass)
246  GEN_VISIT(SgExpBaseClass)
247  GEN_VISIT(SgBaseClassModifier)
248  GEN_VISIT(SgBasicBlock)
249  GEN_VISIT(SgBidirectionalGraph)
250  GEN_VISIT(SgBinaryOp)
251  GEN_VISIT(SgBitAndOp)
252  GEN_VISIT(SgBitAttribute)
253  GEN_VISIT(SgBitComplementOp)
254  GEN_VISIT(SgBitEqvOp)
255  GEN_VISIT(SgBitOrOp)
256  GEN_VISIT(SgBitXorOp)
257  GEN_VISIT(SgBlockDataStatement)
258  GEN_VISIT(SgBoolValExp)
259  GEN_VISIT(SgBreakStmt)
260  GEN_VISIT(SgBracedInitializer)
262  GEN_VISIT(SgCaseOptionStmt)
263  GEN_VISIT(SgCastExp)
264  GEN_VISIT(SgCatchOptionStmt)
265  GEN_VISIT(SgCatchStatementSeq)
266  GEN_VISIT(SgCharVal)
267  GEN_VISIT(SgChar16Val)
268  GEN_VISIT(SgChar32Val)
269  GEN_VISIT(SgChooseExpression)
270  GEN_VISIT(SgClassDecl_attr)
271  GEN_VISIT(SgClassDeclaration)
272  GEN_VISIT(SgClassDefinition)
273  GEN_VISIT(SgClassNameRefExp)
274  GEN_VISIT(SgClassSymbol)
275  GEN_VISIT(SgClassType)
277  GEN_VISIT(SgClinkageEndStatement)
278  GEN_VISIT(SgClinkageStartStatement)
279  GEN_VISIT(SgCloseStatement)
280  GEN_VISIT(SgColonShapeExp)
281  GEN_VISIT(SgCommaOpExp)
282  GEN_VISIT(SgCommonBlock)
283  GEN_VISIT(SgCommonBlockObject)
284  GEN_VISIT(SgCommonSymbol)
285  GEN_VISIT(SgComplexVal)
286  GEN_VISIT(SgComprehension)
287  GEN_VISIT(SgCompoundAssignOp)
288  GEN_VISIT(SgCompoundInitializer)
289  GEN_VISIT(SgCompoundLiteralExp)
290  GEN_VISIT(SgComputedGotoStatement)
291  GEN_VISIT(SgConcatenationOp)
292  GEN_VISIT(SgConditionalExp)
293  GEN_VISIT(SgConjugateOp)
294  GEN_VISIT(SgConstVolatileModifier)
295  GEN_VISIT(SgConstructorInitializer)
296  GEN_VISIT(SgContainsStatement)
297  GEN_VISIT(SgContinueStmt)
298  GEN_VISIT(SgCtorInitializerList)
299  GEN_VISIT(SgDataStatementGroup)
300  GEN_VISIT(SgDataStatementObject)
301  GEN_VISIT(SgDataStatementValue)
302  GEN_VISIT(SgDeadIfDirectiveStatement)
303  GEN_VISIT(SgDeallocateStatement)
304  GEN_VISIT(SgDeclarationModifier)
305  GEN_VISIT(SgDeclarationScope)
306  GEN_VISIT(SgDeclarationStatement)
307  GEN_VISIT(SgDeclType)
308  GEN_VISIT(SgDefaultOptionStmt)
309  GEN_VISIT(SgDefaultSymbol)
310  GEN_VISIT(SgDefineDirectiveStatement)
311  GEN_VISIT(SgDeleteExp)
312  GEN_VISIT(SgDerivedTypeStatement)
313  GEN_VISIT(SgDesignatedInitializer)
314  GEN_VISIT(SgDictionaryComprehension)
315  GEN_VISIT(SgDictionaryExp)
316  GEN_VISIT(SgDimensionObject)
317  GEN_VISIT(SgDirectory)
318  GEN_VISIT(SgDirectoryList)
319  GEN_VISIT(SgDivAssignOp)
320  GEN_VISIT(SgDivideOp)
321  GEN_VISIT(SgDoWhileStmt)
322  GEN_VISIT(SgDotExp)
323  GEN_VISIT(SgDotStarOp)
324  GEN_VISIT(SgDoubleVal)
325  GEN_VISIT(SgElaboratedTypeModifier)
326  GEN_VISIT(SgElementwiseOp)
327  GEN_VISIT(SgElementwiseAddOp)
328  GEN_VISIT(SgElementwiseDivideOp)
329  GEN_VISIT(SgElementwiseLeftDivideOp)
330  GEN_VISIT(SgElementwiseMultiplyOp)
331  GEN_VISIT(SgElementwisePowerOp)
332  GEN_VISIT(SgElementwiseSubtractOp)
333  GEN_VISIT(SgElseDirectiveStatement)
334  GEN_VISIT(SgElseWhereStatement)
335  GEN_VISIT(SgElseifDirectiveStatement)
336  GEN_VISIT(SgEmptyDeclaration)
337  GEN_VISIT(SgEmptyDirectiveStatement)
338  GEN_VISIT(SgEndfileStatement)
339  GEN_VISIT(SgEndifDirectiveStatement)
340  GEN_VISIT(SgEntryStatement)
341  GEN_VISIT(SgEnumDeclaration)
342  GEN_VISIT(SgEnumFieldSymbol)
343  GEN_VISIT(SgEnumSymbol)
344  GEN_VISIT(SgEnumType)
345  GEN_VISIT(SgEnumVal)
346  GEN_VISIT(SgEqualityOp)
347  GEN_VISIT(SgEquivalenceStatement)
348  GEN_VISIT(SgErrorDirectiveStatement)
349  GEN_VISIT(SgExecStatement)
350  GEN_VISIT(SgExponentiationOp)
351  GEN_VISIT(SgExponentiationAssignOp)
352  GEN_VISIT(SgExprListExp)
353  GEN_VISIT(SgExprStatement)
354  GEN_VISIT(SgExpression)
355  GEN_VISIT(SgExpressionRoot)
356  GEN_VISIT(SgFile)
357  GEN_VISIT(SgFileList)
358  GEN_VISIT(SgFloatVal)
359  GEN_VISIT(SgFloat128Val)
360  GEN_VISIT(SgFloat80Val)
361  GEN_VISIT(SgFoldExpression)
362  GEN_VISIT(SgFlushStatement)
363  GEN_VISIT(SgForAllStatement)
364  GEN_VISIT(SgForInitStatement)
365  GEN_VISIT(SgForStatement)
366  GEN_VISIT(SgFormatItem)
367  GEN_VISIT(SgFormatItemList)
368  GEN_VISIT(SgFormatStatement)
369  GEN_VISIT(SgFortranDo)
370  GEN_VISIT(SgFortranIncludeLine)
371  GEN_VISIT(SgFortranNonblockedDo)
372  GEN_VISIT(SgFuncDecl_attr)
373  GEN_VISIT(SgFunctionCallExp)
374  GEN_VISIT(SgFunctionDeclaration)
375  GEN_VISIT(SgFunctionDefinition)
376  GEN_VISIT(SgFunctionParameterScope)
377  GEN_VISIT(SgFunctionModifier)
378  GEN_VISIT(SgFunctionParameterList)
379  GEN_VISIT(SgFunctionParameterRefExp)
380  GEN_VISIT(SgFunctionParameterTypeList)
381  GEN_VISIT(SgFunctionRefExp)
382  GEN_VISIT(SgFunctionSymbol)
383  GEN_VISIT(SgFunctionType)
384  GEN_VISIT(SgFunctionTypeSymbol)
385  GEN_VISIT(SgFunctionTypeTable)
386  GEN_VISIT(SgTypeTable)
387  GEN_VISIT(SgGlobal)
388  GEN_VISIT(SgGotoStatement)
389  GEN_VISIT(SgGraph)
390  GEN_VISIT(SgGraphEdge)
391  GEN_VISIT(SgGraphEdgeList)
392  GEN_VISIT(SgGraphNode)
393  GEN_VISIT(SgGraphNodeList)
394  GEN_VISIT(SgGreaterOrEqualOp)
395  GEN_VISIT(SgGreaterThanOp)
396  GEN_VISIT(SgIOItemExpression)
397  GEN_VISIT(SgIOStatement)
398  GEN_VISIT(SgIdentDirectiveStatement)
399  GEN_VISIT(SgIfDirectiveStatement)
400  GEN_VISIT(SgIfStmt)
401  GEN_VISIT(SgIfdefDirectiveStatement)
402  GEN_VISIT(SgIfndefDirectiveStatement)
403  GEN_VISIT(SgImageControlStatement)
404  GEN_VISIT(SgImagPartOp)
405  GEN_VISIT(SgImplicitStatement)
406  GEN_VISIT(SgImpliedDo)
407  GEN_VISIT(SgImportStatement)
408  GEN_VISIT(SgIncidenceDirectedGraph)
409  GEN_VISIT(SgIncidenceUndirectedGraph)
410  GEN_VISIT(SgIncludeDirectiveStatement)
411  GEN_VISIT(SgIncludeFile)
413  GEN_VISIT(SgInitializedName)
414  GEN_VISIT(SgInitializer)
415  GEN_VISIT(SgInquireStatement)
417  GEN_VISIT(SgIntVal)
418  GEN_VISIT(SgIntegerDivideOp)
419  GEN_VISIT(SgIntegerDivideAssignOp)
420  GEN_VISIT(SgInterfaceBody)
421  GEN_VISIT(SgHeaderFileBody)
422  GEN_VISIT(SgHeaderFileReport)
423  GEN_VISIT(SgInterfaceStatement)
424  GEN_VISIT(SgInterfaceSymbol)
425  GEN_VISIT(SgIntrinsicSymbol)
426  GEN_VISIT(SgIsOp)
427  GEN_VISIT(SgIsNotOp)
428  GEN_VISIT(SgIorAssignOp)
429  GEN_VISIT(SgJovialBitType)
430  GEN_VISIT(SgJovialBitVal)
431  GEN_VISIT(SgJovialTableType)
432  GEN_VISIT(SgJovialCompoolStatement)
433  GEN_VISIT(SgJovialForThenStatement)
434  GEN_VISIT(SgJovialDefineDeclaration)
435  GEN_VISIT(SgJovialDirectiveStatement)
436  GEN_VISIT(SgJovialOverlayDeclaration)
437  GEN_VISIT(SgJovialTablePresetExp)
438  GEN_VISIT(SgJovialTableStatement)
439  GEN_VISIT(SgKeyDatumPair)
440  GEN_VISIT(SgCudaKernelExecConfig)
441  GEN_VISIT(SgCudaKernelCallExp)
442  GEN_VISIT(SgLabelRefExp)
443  GEN_VISIT(SgLabelStatement)
444  GEN_VISIT(SgJavaLabelStatement)
445  GEN_VISIT(SgLabelSymbol)
446  GEN_VISIT(SgJavaLabelSymbol)
447  GEN_VISIT(SgLambdaCapture)
448  GEN_VISIT(SgLambdaCaptureList)
449  GEN_VISIT(SgLambdaExp)
450  GEN_VISIT(SgLambdaRefExp)
451  GEN_VISIT(SgLeftDivideOp)
452  GEN_VISIT(SgLessOrEqualOp)
453  GEN_VISIT(SgLessThanOp)
454  GEN_VISIT(SgLineDirectiveStatement)
456  GEN_VISIT(SgLinkageModifier)
457  GEN_VISIT(SgListComprehension)
458  GEN_VISIT(SgListExp)
459  GEN_VISIT(SgLocatedNode)
460  GEN_VISIT(SgLocatedNodeSupport)
461  GEN_VISIT(SgLongDoubleVal)
462  GEN_VISIT(SgLongIntVal)
463  GEN_VISIT(SgLongLongIntVal)
464  GEN_VISIT(SgLshiftAssignOp)
465  GEN_VISIT(SgLshiftOp)
466  GEN_VISIT(SgMagicColonExp)
467  GEN_VISIT(SgMatrixExp)
468  GEN_VISIT(SgMatrixTransposeOp)
469  GEN_VISIT(SgMatlabForStatement)
470  GEN_VISIT(SgMemberFunctionDeclaration)
471  GEN_VISIT(SgMemberFunctionRefExp)
472  GEN_VISIT(SgMemberFunctionSymbol)
473  GEN_VISIT(SgMemberFunctionType)
474  GEN_VISIT(SgMembershipOp)
476  GEN_VISIT(SgMinusAssignOp)
477  GEN_VISIT(SgMinusMinusOp)
478  GEN_VISIT(SgMinusOp)
479  GEN_VISIT(SgModAssignOp)
480  GEN_VISIT(SgModOp)
481  GEN_VISIT(SgModifier)
482  GEN_VISIT(SgModifierNodes)
483  GEN_VISIT(SgModifierType)
484  GEN_VISIT(SgModuleStatement)
485  GEN_VISIT(SgModuleSymbol)
486  GEN_VISIT(SgMultAssignOp)
487  GEN_VISIT(SgMultiplyOp)
488  GEN_VISIT(SgName)
489  GEN_VISIT(SgNameGroup)
490  GEN_VISIT(SgNamedType)
491  GEN_VISIT(SgNamelistStatement)
495  GEN_VISIT(SgNamespaceSymbol)
496  GEN_VISIT(SgNaryOp)
497  GEN_VISIT(SgNaryBooleanOp)
498  GEN_VISIT(SgNaryComparisonOp)
499  GEN_VISIT(SgNewExp)
500  GEN_VISIT(SgNode)
501  GEN_VISIT(SgNoexceptOp)
502  GEN_VISIT(SgNotEqualOp)
503  GEN_VISIT(SgNotOp)
504  GEN_VISIT(SgNonMembershipOp)
505  GEN_VISIT(SgNonrealDecl)
506  GEN_VISIT(SgNonrealRefExp)
507  GEN_VISIT(SgNonrealSymbol)
508  GEN_VISIT(SgNonrealType)
509  GEN_VISIT(SgNonrealBaseClass)
510  GEN_VISIT(SgNullExpression)
511  GEN_VISIT(SgNullptrValExp)
512  GEN_VISIT(SgNullStatement)
513  GEN_VISIT(SgNullifyStatement)
514  GEN_VISIT(SgOmpAtomicStatement)
515  GEN_VISIT(SgOmpBarrierStatement)
516  GEN_VISIT(SgOmpCriticalStatement)
517  GEN_VISIT(SgOmpClauseBodyStatement)
518  GEN_VISIT(SgOmpBodyStatement)
519  GEN_VISIT(SgOmpDoStatement)
520  GEN_VISIT(SgOmpFlushStatement)
521  GEN_VISIT(SgOmpDeclareSimdStatement)
522  GEN_VISIT(SgOmpForStatement)
523  GEN_VISIT(SgOmpForSimdStatement)
524  GEN_VISIT(SgOmpMasterStatement)
525  GEN_VISIT(SgOmpOrderedStatement)
526  GEN_VISIT(SgOmpParallelStatement)
527  GEN_VISIT(SgOmpSectionStatement)
528  GEN_VISIT(SgOmpSectionsStatement)
529  GEN_VISIT(SgOmpSingleStatement)
530  GEN_VISIT(SgOmpTaskStatement)
531  GEN_VISIT(SgOmpTaskwaitStatement)
532  GEN_VISIT(SgOmpThreadprivateStatement)
533  GEN_VISIT(SgOmpWorkshareStatement)
534  GEN_VISIT(SgOmpTargetStatement)
535  GEN_VISIT(SgOmpTargetDataStatement)
536  GEN_VISIT(SgOmpSimdStatement)
537  GEN_VISIT(SgOmpClause)
538  GEN_VISIT(SgOmpBeginClause)
539  GEN_VISIT(SgOmpCollapseClause)
540  GEN_VISIT(SgOmpCopyinClause)
541  GEN_VISIT(SgOmpCopyprivateClause)
542  GEN_VISIT(SgOmpDefaultClause)
543  GEN_VISIT(SgOmpEndClause)
544  GEN_VISIT(SgOmpExpressionClause)
545  GEN_VISIT(SgOmpFirstprivateClause)
546  GEN_VISIT(SgOmpIfClause)
547  GEN_VISIT(SgOmpFinalClause)
548  GEN_VISIT(SgOmpPriorityClause)
549  GEN_VISIT(SgOmpDeviceClause)
550  GEN_VISIT(SgOmpLastprivateClause)
551  GEN_VISIT(SgOmpNowaitClause)
552  GEN_VISIT(SgOmpNumThreadsClause)
553  GEN_VISIT(SgOmpOrderedClause)
554  GEN_VISIT(SgOmpPrivateClause)
555  GEN_VISIT(SgOmpReductionClause)
556  GEN_VISIT(SgOmpScheduleClause)
557  GEN_VISIT(SgOmpSharedClause)
558  GEN_VISIT(SgOmpUntiedClause)
559  GEN_VISIT(SgOmpMergeableClause)
560  GEN_VISIT(SgOmpVariablesClause)
561  GEN_VISIT(SgOmpMapClause)
562  GEN_VISIT(SgOmpSafelenClause)
563  GEN_VISIT(SgOmpSimdlenClause)
564  GEN_VISIT(SgOmpLinearClause)
565  GEN_VISIT(SgOmpUniformClause)
566  GEN_VISIT(SgOmpAlignedClause)
567  GEN_VISIT(SgOmpProcBindClause)
568  GEN_VISIT(SgOmpAtomicClause)
569  GEN_VISIT(SgOmpInbranchClause)
570  GEN_VISIT(SgOmpNotinbranchClause)
571  GEN_VISIT(SgOmpDependClause)
572  GEN_VISIT(SgOpenclAccessModeModifier)
573  GEN_VISIT(SgOpenStatement)
574  GEN_VISIT(SgOptions)
575  GEN_VISIT(SgOrOp)
576  GEN_VISIT(SgParameterStatement)
578  GEN_VISIT(SgPartialFunctionType)
579  GEN_VISIT(SgPassStatement)
580  GEN_VISIT(SgPlusAssignOp)
581  GEN_VISIT(SgPlusPlusOp)
582  GEN_VISIT(SgPntrArrRefExp)
583  GEN_VISIT(SgPointerAssignOp)
584  GEN_VISIT(SgPointerDerefExp)
585  GEN_VISIT(SgPointerMemberType)
586  GEN_VISIT(SgPointerType)
587  GEN_VISIT(SgPowerOp)
588  GEN_VISIT(SgPragma)
589  GEN_VISIT(SgPragmaDeclaration)
590  GEN_VISIT(SgPrintStatement)
591  GEN_VISIT(SgProcedureHeaderStatement)
592  GEN_VISIT(SgProgramHeaderStatement)
593  GEN_VISIT(SgProject)
594  GEN_VISIT(SgPseudoDestructorRefExp)
595  GEN_VISIT(SgPythonGlobalStmt)
596  GEN_VISIT(SgPythonPrintStmt)
597  GEN_VISIT(SgQualifiedName)
598  GEN_VISIT(SgQualifiedNameType)
599  GEN_VISIT(SgRangeExp)
600  GEN_VISIT(SgRangeBasedForStatement)
601  GEN_VISIT(SgReadStatement)
602  GEN_VISIT(SgRealPartOp)
603  GEN_VISIT(SgRefExp)
604  GEN_VISIT(SgReferenceType)
605  GEN_VISIT(SgRemOp)
606  GEN_VISIT(SgRenamePair)
607  GEN_VISIT(SgRenameSymbol)
608  GEN_VISIT(SgReplicationOp)
609  GEN_VISIT(SgReturnStmt)
610  GEN_VISIT(SgRewindStatement)
611  GEN_VISIT(SgRshiftAssignOp)
612  GEN_VISIT(SgRshiftOp)
613  GEN_VISIT(SgRvalueReferenceType)
615  GEN_VISIT(SgJavaUnsignedRshiftOp)
616  GEN_VISIT(SgScopeOp)
617  GEN_VISIT(SgScopeStatement)
618  GEN_VISIT(SgSequenceStatement)
619  GEN_VISIT(SgSetComprehension)
620  GEN_VISIT(SgShortVal)
621  GEN_VISIT(SgSizeOfOp)
622  GEN_VISIT(SgAlignOfOp)
623  GEN_VISIT(SgJavaInstanceOfOp)
624  GEN_VISIT(SgSourceFile)
625  GEN_VISIT(SgSpaceshipOp)
626  GEN_VISIT(SgSpawnStmt)
627  GEN_VISIT(SgSyncAllStatement)
628  GEN_VISIT(SgSyncImagesStatement)
629  GEN_VISIT(SgSyncMemoryStatement)
630  GEN_VISIT(SgSyncTeamStatement)
631  GEN_VISIT(SgLockStatement)
632  GEN_VISIT(SgUnlockStatement)
633  GEN_VISIT(SgJavaThrowStatement)
634  GEN_VISIT(SgJavaForEachStatement)
635  GEN_VISIT(SgJavaSynchronizedStatement)
636  GEN_VISIT(SgJavaParameterizedType)
637  GEN_VISIT(SgJavaWildcardType)
638  GEN_VISIT(SgProcessControlStatement)
639  GEN_VISIT(SgSpecialFunctionModifier)
640  GEN_VISIT(SgStatement)
642  GEN_VISIT(SgStmtDeclarationStatement)
643  GEN_VISIT(SgStatementExpression)
645  GEN_VISIT(SgStorageModifier)
646  GEN_VISIT(SgStringConversion)
648  GEN_VISIT(SgStringVal)
649  GEN_VISIT(SgStructureModifier)
650  GEN_VISIT(SgSubscriptExpression)
651  GEN_VISIT(SgSubtractOp)
652  GEN_VISIT(SgSupport)
653  GEN_VISIT(SgSwitchStatement)
654  GEN_VISIT(SgSymbol)
655  GEN_VISIT(SgSymbolTable)
656  GEN_VISIT(SgTemplateArgument)
657  GEN_VISIT(SgTemplateArgumentList)
658  GEN_VISIT(SgTemplateDeclaration)
659  GEN_VISIT(SgTemplateClassDeclaration)
660  GEN_VISIT(SgTemplateClassSymbol)
662  GEN_VISIT(SgTemplateFunctionRefExp)
663  GEN_VISIT(SgTemplateFunctionSymbol)
668  GEN_VISIT(SgTemplateTypedefSymbol)
670  GEN_VISIT(SgTemplateVariableSymbol)
671  GEN_VISIT(SgTemplateClassDefinition)
673  GEN_VISIT(SgTemplateInstantiationDecl)
674  GEN_VISIT(SgTemplateInstantiationDefn)
679  GEN_VISIT(SgTemplateParameter)
680  GEN_VISIT(SgTemplateParameterVal)
681  GEN_VISIT(SgTemplateParameterList)
682  GEN_VISIT(SgTemplateSymbol)
683  GEN_VISIT(SgTemplateType)
684  GEN_VISIT(SgThisExp)
685  GEN_VISIT(SgTypeTraitBuiltinOperator)
686  GEN_VISIT(SgSuperExp)
687  GEN_VISIT(SgThrowOp)
688  GEN_VISIT(SgToken)
689  GEN_VISIT(SgTryStmt)
690  GEN_VISIT(SgTupleExp)
691  GEN_VISIT(SgType)
692  GEN_VISIT(SgTypeBool)
693  GEN_VISIT(SgTypeChar)
694  GEN_VISIT(SgTypeChar16)
695  GEN_VISIT(SgTypeChar32)
696  GEN_VISIT(SgTypeComplex)
697  GEN_VISIT(SgTypeDefault)
698  GEN_VISIT(SgTypeExpression)
699  GEN_VISIT(SgTypeLabel)
700  GEN_VISIT(SgTypeDouble)
701  GEN_VISIT(SgTypeEllipse)
702  GEN_VISIT(SgTypeFixed)
703  GEN_VISIT(SgTypeFloat)
704  GEN_VISIT(SgTypeFloat128)
705  GEN_VISIT(SgTypeFloat80)
706  GEN_VISIT(SgTypeGlobalVoid)
707  GEN_VISIT(SgTypeIdOp)
708  GEN_VISIT(SgTypeImaginary)
709  GEN_VISIT(SgTypeInt)
710  GEN_VISIT(SgTypeLong)
711  GEN_VISIT(SgTypeLongDouble)
712  GEN_VISIT(SgTypeLongLong)
713  GEN_VISIT(SgTypeModifier)
714  GEN_VISIT(SgTypeMatrix)
715  GEN_VISIT(SgTypeTuple)
716  GEN_VISIT(SgTypeNullptr)
717  GEN_VISIT(SgTypeOfType)
718  GEN_VISIT(SgTypeShort)
719  GEN_VISIT(SgTypeSigned128bitInteger)
720  GEN_VISIT(SgTypeSignedChar)
721  GEN_VISIT(SgTypeSignedInt)
722  GEN_VISIT(SgTypeSignedLong)
723  GEN_VISIT(SgTypeSignedLongLong)
724  GEN_VISIT(SgTypeSignedShort)
725  GEN_VISIT(SgTypeString)
726  GEN_VISIT(SgTypeUnknown)
727  GEN_VISIT(SgTypeUnsigned128bitInteger)
728  GEN_VISIT(SgTypeUnsignedChar)
729  GEN_VISIT(SgTypeUnsignedInt)
730  GEN_VISIT(SgTypeUnsignedLong)
731  GEN_VISIT(SgTypeUnsignedLongLong)
732  GEN_VISIT(SgTypeUnsignedShort)
733  GEN_VISIT(SgTypeVoid)
734  GEN_VISIT(SgTypeWchar)
735  GEN_VISIT(SgTypedefDeclaration)
736  GEN_VISIT(SgTypedefSeq)
737  GEN_VISIT(SgTypedefSymbol)
738  GEN_VISIT(SgTypedefType)
739  GEN_VISIT(SgUPC_AccessModifier)
740  GEN_VISIT(SgUnaryAddOp)
741  GEN_VISIT(SgUnaryOp)
742  GEN_VISIT(SgUndefDirectiveStatement)
743  GEN_VISIT(SgUndirectedGraphEdge)
745  GEN_VISIT(SgUnknownFile)
746  GEN_VISIT(SgUnparse_Info)
747  GEN_VISIT(SgUnsignedCharVal)
748  GEN_VISIT(SgUnsignedIntVal)
749  GEN_VISIT(SgUnsignedLongLongIntVal)
750  GEN_VISIT(SgUnsignedLongVal)
751  GEN_VISIT(SgUnsignedShortVal)
752  GEN_VISIT(SgUpcBarrierStatement)
753  GEN_VISIT(SgUpcBlocksizeofExpression)
754  GEN_VISIT(SgUpcElemsizeofExpression)
755  GEN_VISIT(SgUpcFenceStatement)
756  GEN_VISIT(SgUpcForAllStatement)
757  GEN_VISIT(SgUpcLocalsizeofExpression)
758  GEN_VISIT(SgUpcMythread)
759  GEN_VISIT(SgUpcNotifyStatement)
760  GEN_VISIT(SgUpcThreads)
761  GEN_VISIT(SgUpcWaitStatement)
762  GEN_VISIT(SgUseStatement)
763  GEN_VISIT(SgUserDefinedBinaryOp)
764  GEN_VISIT(SgUserDefinedUnaryOp)
765  GEN_VISIT(SgUsingDeclarationStatement)
766  GEN_VISIT(SgUsingDirectiveStatement)
767  GEN_VISIT(SgValueExp)
768  GEN_VISIT(SgVarArgCopyOp)
769  GEN_VISIT(SgVarArgEndOp)
770  GEN_VISIT(SgVarArgOp)
771  GEN_VISIT(SgVarArgStartOneOperandOp)
772  GEN_VISIT(SgVarArgStartOp)
773  GEN_VISIT(SgVarRefExp)
774  GEN_VISIT(SgVariableDeclaration)
775  GEN_VISIT(SgVariableDefinition)
776  GEN_VISIT(SgVariableSymbol)
777  GEN_VISIT(SgVariantExpression)
778  GEN_VISIT(SgVariantStatement)
779  GEN_VISIT(SgVoidVal)
780  GEN_VISIT(SgWaitStatement)
781  GEN_VISIT(SgWarningDirectiveStatement)
782  GEN_VISIT(SgWithStatement)
783  GEN_VISIT(SgWcharVal)
784  GEN_VISIT(SgWhereStatement)
785  GEN_VISIT(SgWhileStmt)
786  GEN_VISIT(SgWriteStatement)
787  GEN_VISIT(SgXorAssignOp)
788  GEN_VISIT(SgYieldExpression)
789  GEN_VISIT(Sg_File_Info)
790  GEN_VISIT(SgTypeCAFTeam)
791  GEN_VISIT(SgCAFWithTeamStatement)
792  GEN_VISIT(SgCAFCoExpression)
793  GEN_VISIT(SgCallExpression)
794  GEN_VISIT(SgTypeCrayPointer)
795  GEN_VISIT(SgJavaImportStatement)
796  GEN_VISIT(SgJavaPackageDeclaration)
797  GEN_VISIT(SgJavaPackageStatement)
798  GEN_VISIT(SgJavaImportStatementList)
799  GEN_VISIT(SgJavaClassDeclarationList)
800  GEN_VISIT(SgJavaMemberValuePair)
801  GEN_VISIT(SgJavaAnnotation)
802  GEN_VISIT(SgJavaMarkerAnnotation)
804  GEN_VISIT(SgJavaNormalAnnotation)
805  GEN_VISIT(SgJavaTypeExpression)
806  GEN_VISIT(SgJavaQualifiedType)
807  GEN_VISIT(SgClassExp)
808  GEN_VISIT(SgJavaUnionType)
809  GEN_VISIT(SgJavaParameterType)
810  GEN_VISIT(SgAsyncStmt)
811  GEN_VISIT(SgFinishStmt)
812  GEN_VISIT(SgAtStmt)
813  GEN_VISIT(SgAtomicStmt)
814 // GEN_VISIT(SgClassPropertyList)
815  GEN_VISIT(SgWhenStmt)
816  GEN_VISIT(SgAtExp)
817  GEN_VISIT(SgFinishExp)
818  GEN_VISIT(SgHereExp)
819  GEN_VISIT(SgDotDotExp)
820  GEN_VISIT(SgAdaOthersExp)
821  GEN_VISIT(SgAdaUnitRefExp)
822  GEN_VISIT(SgAdaDiscriminatedTypeDecl)
823  GEN_VISIT(SgAdaDiscriminatedType)
824  GEN_VISIT(SgAdaDiscriminantConstraint)
825  GEN_VISIT(SgAdaGenericSymbol)
826 
827  GEN_VISIT(SgAdaProtectedBody)
828  GEN_VISIT(SgAdaProtectedBodyDecl)
829  GEN_VISIT(SgAdaProtectedSpec)
830  GEN_VISIT(SgAdaProtectedSpecDecl)
831  GEN_VISIT(SgAdaProtectedSymbol)
832  GEN_VISIT(SgAdaProtectedRefExp)
833  GEN_VISIT(SgAdaProtectedType)
834  GEN_VISIT(SgAdaProtectedTypeDecl)
835  GEN_VISIT(SgAdaDigitsConstraint)
836  GEN_VISIT(SgAdaAncestorInitializer)
837  GEN_VISIT(SgAdaDeltaConstraint)
838  GEN_VISIT(SgAdaSubroutineType)
839  GEN_VISIT(SgAdaGenericInstanceSymbol)
840  GEN_VISIT(SgAdaFormalPackageDecl)
841  GEN_VISIT(SgAdaFormalPackageSymbol)
842  GEN_VISIT(SgAdaNullConstraint)
843  GEN_VISIT(SgAdaUnscopedBlock)
844  GEN_VISIT(SgAdaVariantDecl)
845  GEN_VISIT(SgAdaVariantWhenStmt)
846 
847 
848 #if WITH_BINARY_NODES
849  GEN_VISIT(SgAsmAarch64AtOperand)
850  GEN_VISIT(SgAsmAarch64BarrierOperand)
851  GEN_VISIT(SgAsmAarch64CImmediateOperand)
852  GEN_VISIT(SgAsmAarch64Instruction)
853  GEN_VISIT(SgAsmAarch64PrefetchOperand)
854  GEN_VISIT(SgAsmAarch64SysMoveOperand)
855  GEN_VISIT(SgAsmBasicString)
856  GEN_VISIT(SgAsmBinaryAdd)
857  GEN_VISIT(SgAsmBinaryAddPostupdate)
858  GEN_VISIT(SgAsmBinaryAddPreupdate)
859  GEN_VISIT(SgAsmBinaryAsr)
860  GEN_VISIT(SgAsmBinaryDivide)
861  GEN_VISIT(SgAsmBinaryExpression)
862  GEN_VISIT(SgAsmBinaryLsl)
863  GEN_VISIT(SgAsmBinaryLsr)
864  GEN_VISIT(SgAsmBinaryMod)
865  GEN_VISIT(SgAsmBinaryMsl)
866  GEN_VISIT(SgAsmBinaryMultiply)
867  GEN_VISIT(SgAsmBinaryRor)
868  GEN_VISIT(SgAsmBinarySubtract)
869  GEN_VISIT(SgAsmBinarySubtractPostupdate)
870  GEN_VISIT(SgAsmBinarySubtractPreupdate)
871  GEN_VISIT(SgAsmBlock)
872  GEN_VISIT(SgAsmCoffStrtab)
873  GEN_VISIT(SgAsmCoffSymbol)
874  GEN_VISIT(SgAsmCoffSymbolList)
875  GEN_VISIT(SgAsmCoffSymbolTable)
876  GEN_VISIT(SgAsmCommonSubExpression)
877  GEN_VISIT(SgAsmControlFlagsExpression)
878  GEN_VISIT(SgAsmConstantExpression)
879  GEN_VISIT(SgAsmDOSExtendedHeader)
880  GEN_VISIT(SgAsmDOSFileHeader)
882  GEN_VISIT(SgAsmSynthesizedDeclaration)
884  GEN_VISIT(SgAsmDwarfAccessDeclaration)
885  GEN_VISIT(SgAsmDwarfArrayType)
886  GEN_VISIT(SgAsmDwarfBaseType)
887  GEN_VISIT(SgAsmDwarfCatchBlock)
888  GEN_VISIT(SgAsmDwarfClassTemplate)
889  GEN_VISIT(SgAsmDwarfClassType)
890  GEN_VISIT(SgAsmDwarfCommonBlock)
891  GEN_VISIT(SgAsmDwarfCommonInclusion)
892  GEN_VISIT(SgAsmDwarfCompilationUnit)
894  GEN_VISIT(SgAsmDwarfCondition)
895  GEN_VISIT(SgAsmDwarfConstType)
896  GEN_VISIT(SgAsmDwarfConstant)
897  GEN_VISIT(SgAsmDwarfConstruct)
898  GEN_VISIT(SgAsmDwarfConstructList)
899  GEN_VISIT(SgAsmDwarfDwarfProcedure)
900  GEN_VISIT(SgAsmDwarfEntryPoint)
901  GEN_VISIT(SgAsmDwarfEnumerationType)
902  GEN_VISIT(SgAsmDwarfEnumerator)
903  GEN_VISIT(SgAsmDwarfFileType)
904  GEN_VISIT(SgAsmDwarfFormalParameter)
905  GEN_VISIT(SgAsmDwarfFormatLabel)
906  GEN_VISIT(SgAsmDwarfFriend)
907  GEN_VISIT(SgAsmDwarfFunctionTemplate)
909  GEN_VISIT(SgAsmDwarfImportedModule)
910  GEN_VISIT(SgAsmDwarfImportedUnit)
911  GEN_VISIT(SgAsmDwarfInformation)
912  GEN_VISIT(SgAsmDwarfInheritance)
913  GEN_VISIT(SgAsmDwarfInlinedSubroutine)
914  GEN_VISIT(SgAsmDwarfInterfaceType)
915  GEN_VISIT(SgAsmDwarfLabel)
916  GEN_VISIT(SgAsmDwarfLexicalBlock)
917  GEN_VISIT(SgAsmDwarfLine)
918  GEN_VISIT(SgAsmDwarfLineList)
919  GEN_VISIT(SgAsmDwarfMacro)
920  GEN_VISIT(SgAsmDwarfMacroList)
921  GEN_VISIT(SgAsmDwarfMember)
922  GEN_VISIT(SgAsmDwarfModule)
923  GEN_VISIT(SgAsmDwarfMutableType)
924  GEN_VISIT(SgAsmDwarfNamelist)
925  GEN_VISIT(SgAsmDwarfNamelistItem)
926  GEN_VISIT(SgAsmDwarfNamespace)
927  GEN_VISIT(SgAsmDwarfPackedType)
928  GEN_VISIT(SgAsmDwarfPartialUnit)
929  GEN_VISIT(SgAsmDwarfPointerType)
930  GEN_VISIT(SgAsmDwarfPtrToMemberType)
931  GEN_VISIT(SgAsmDwarfReferenceType)
932  GEN_VISIT(SgAsmDwarfRestrictType)
933  GEN_VISIT(SgAsmDwarfSetType)
934  GEN_VISIT(SgAsmDwarfSharedType)
935  GEN_VISIT(SgAsmDwarfStringType)
936  GEN_VISIT(SgAsmDwarfStructureType)
937  GEN_VISIT(SgAsmDwarfSubprogram)
938  GEN_VISIT(SgAsmDwarfSubrangeType)
939  GEN_VISIT(SgAsmDwarfSubroutineType)
942  GEN_VISIT(SgAsmDwarfThrownType)
943  GEN_VISIT(SgAsmDwarfTryBlock)
944  GEN_VISIT(SgAsmDwarfTypedef)
945  GEN_VISIT(SgAsmDwarfUnionType)
946  GEN_VISIT(SgAsmDwarfUnknownConstruct)
948  GEN_VISIT(SgAsmDwarfUnspecifiedType)
949  GEN_VISIT(SgAsmDwarfUpcRelaxedType)
950  GEN_VISIT(SgAsmDwarfUpcSharedType)
951  GEN_VISIT(SgAsmDwarfUpcStrictType)
952  GEN_VISIT(SgAsmDwarfVariable)
953  GEN_VISIT(SgAsmDwarfVariant)
954  GEN_VISIT(SgAsmDwarfVariantPart)
955  GEN_VISIT(SgAsmDwarfVolatileType)
956  GEN_VISIT(SgAsmDwarfWithStmt)
957  GEN_VISIT(SgAsmElfDynamicEntry)
958  GEN_VISIT(SgAsmElfDynamicEntryList)
959  GEN_VISIT(SgAsmElfDynamicSection)
960  GEN_VISIT(SgAsmElfEHFrameEntryCI)
961  GEN_VISIT(SgAsmElfEHFrameEntryCIList)
962  GEN_VISIT(SgAsmElfEHFrameEntryFD)
963  GEN_VISIT(SgAsmElfEHFrameEntryFDList)
964  GEN_VISIT(SgAsmElfEHFrameSection)
965  GEN_VISIT(SgAsmElfFileHeader)
966  GEN_VISIT(SgAsmElfNoteEntry)
967  GEN_VISIT(SgAsmElfNoteEntryList)
968  GEN_VISIT(SgAsmElfNoteSection)
969  GEN_VISIT(SgAsmElfRelocEntry)
970  GEN_VISIT(SgAsmElfRelocEntryList)
971  GEN_VISIT(SgAsmElfRelocSection)
972  GEN_VISIT(SgAsmElfSection)
973  GEN_VISIT(SgAsmElfSectionTable)
974  GEN_VISIT(SgAsmElfSectionTableEntry)
975  GEN_VISIT(SgAsmElfSegmentTable)
976  GEN_VISIT(SgAsmElfSegmentTableEntry)
978  GEN_VISIT(SgAsmElfStringSection)
979  GEN_VISIT(SgAsmElfStrtab)
980  GEN_VISIT(SgAsmElfSymbol)
981  GEN_VISIT(SgAsmElfSymbolList)
982  GEN_VISIT(SgAsmElfSymbolSection)
983  GEN_VISIT(SgAsmElfSymverDefinedAux)
985  GEN_VISIT(SgAsmElfSymverDefinedEntry)
988  GEN_VISIT(SgAsmElfSymverEntry)
989  GEN_VISIT(SgAsmElfSymverEntryList)
990  GEN_VISIT(SgAsmElfSymverNeededAux)
991  GEN_VISIT(SgAsmElfSymverNeededAuxList)
992  GEN_VISIT(SgAsmElfSymverNeededEntry)
994  GEN_VISIT(SgAsmElfSymverNeededSection)
995  GEN_VISIT(SgAsmElfSymverSection)
996  GEN_VISIT(SgAsmExecutableFileFormat)
997  GEN_VISIT(SgAsmExprListExp)
998  GEN_VISIT(SgAsmExpression)
1000  GEN_VISIT(SgAsmFloatType)
1001  GEN_VISIT(SgAsmFloatValueExpression)
1002  GEN_VISIT(SgAsmFunction)
1003  GEN_VISIT(SgAsmGenericDLL)
1004  GEN_VISIT(SgAsmGenericDLLList)
1005  GEN_VISIT(SgAsmGenericFile)
1006  GEN_VISIT(SgAsmGenericFileList)
1007  GEN_VISIT(SgAsmGenericFormat)
1008  GEN_VISIT(SgAsmGenericHeader)
1009  GEN_VISIT(SgAsmGenericHeaderList)
1010  GEN_VISIT(SgAsmGenericSection)
1011  GEN_VISIT(SgAsmGenericSectionList)
1012  GEN_VISIT(SgAsmGenericString)
1013  GEN_VISIT(SgAsmGenericStrtab)
1014  GEN_VISIT(SgAsmGenericSymbol)
1015  GEN_VISIT(SgAsmGenericSymbolList)
1017  GEN_VISIT(SgAsmInstruction)
1018  GEN_VISIT(SgAsmIntegerValueExpression)
1019  GEN_VISIT(SgAsmIntegerType)
1020  GEN_VISIT(SgAsmInterpretation)
1021  GEN_VISIT(SgAsmInterpretationList)
1022  GEN_VISIT(SgAsmLEEntryPoint)
1023  GEN_VISIT(SgAsmLEEntryTable)
1024  GEN_VISIT(SgAsmLEFileHeader)
1025  GEN_VISIT(SgAsmLENameTable)
1026  GEN_VISIT(SgAsmLEPageTable)
1027  GEN_VISIT(SgAsmLEPageTableEntry)
1028  GEN_VISIT(SgAsmLERelocTable)
1029  GEN_VISIT(SgAsmLESection)
1030  GEN_VISIT(SgAsmLESectionTable)
1031  GEN_VISIT(SgAsmLESectionTableEntry)
1032  GEN_VISIT(SgAsmM68kInstruction)
1034  GEN_VISIT(SgAsmMipsInstruction)
1035  GEN_VISIT(SgAsmNEEntryPoint)
1036  GEN_VISIT(SgAsmNEEntryTable)
1037  GEN_VISIT(SgAsmNEFileHeader)
1038  GEN_VISIT(SgAsmNEModuleTable)
1039  GEN_VISIT(SgAsmNENameTable)
1040  GEN_VISIT(SgAsmNERelocEntry)
1041  GEN_VISIT(SgAsmNERelocTable)
1042  GEN_VISIT(SgAsmNESection)
1043  GEN_VISIT(SgAsmNESectionTable)
1044  GEN_VISIT(SgAsmNESectionTableEntry)
1045  GEN_VISIT(SgAsmNEStringTable)
1046  GEN_VISIT(SgAsmNode)
1047  GEN_VISIT(SgAsmOp)
1048  GEN_VISIT(SgAsmOperandList)
1049  GEN_VISIT(SgAsmPEExportDirectory)
1050  GEN_VISIT(SgAsmPEExportEntry)
1051  GEN_VISIT(SgAsmPEExportEntryList)
1052  GEN_VISIT(SgAsmPEExportSection)
1053  GEN_VISIT(SgAsmPEFileHeader)
1054  GEN_VISIT(SgAsmPEImportDirectory)
1055  GEN_VISIT(SgAsmPEImportDirectoryList)
1056  GEN_VISIT(SgAsmPEImportItem)
1057  GEN_VISIT(SgAsmPEImportItemList)
1058  GEN_VISIT(SgAsmPEImportSection)
1059  GEN_VISIT(SgAsmPERVASizePair)
1060  GEN_VISIT(SgAsmPERVASizePairList)
1061  GEN_VISIT(SgAsmPESection)
1062  GEN_VISIT(SgAsmPESectionTable)
1063  GEN_VISIT(SgAsmPESectionTableEntry)
1064  GEN_VISIT(SgAsmPEStringSection)
1065  GEN_VISIT(SgAsmPowerpcInstruction)
1066  GEN_VISIT(SgAsmRegisterNames)
1068  GEN_VISIT(SgAsmRiscOperation)
1069  GEN_VISIT(SgAsmScalarType)
1070  GEN_VISIT(SgAsmStatement)
1071  GEN_VISIT(SgAsmStaticData)
1072  GEN_VISIT(SgAsmStmt)
1073  GEN_VISIT(SgAsmStoredString)
1074  GEN_VISIT(SgAsmStringStorage)
1075  GEN_VISIT(SgAsmType)
1076  GEN_VISIT(SgAsmUnaryExpression)
1077  GEN_VISIT(SgAsmUnaryMinus)
1078  GEN_VISIT(SgAsmUnaryPlus)
1079  GEN_VISIT(SgAsmUnaryRrx)
1080  GEN_VISIT(SgAsmUnarySignedExtend)
1081  GEN_VISIT(SgAsmUnaryUnsignedExtend)
1082  GEN_VISIT(SgAsmUnaryTruncate)
1083  GEN_VISIT(SgAsmValueExpression)
1084  GEN_VISIT(SgAsmVectorType)
1085  GEN_VISIT(SgAsmX86Instruction)
1086  GEN_VISIT(SgAsmBinaryAddressSymbol)
1087  GEN_VISIT(SgAsmBinaryDataSymbol)
1088  GEN_VISIT(SgAsmNullInstruction)
1089 
1090  GEN_VISIT(SgAsmJvmModuleMainClass)
1091  GEN_VISIT(SgAsmInstructionList)
1092  GEN_VISIT(SgAsmCilNode)
1093  GEN_VISIT(SgAsmCilAssembly)
1094  GEN_VISIT(SgAsmCilAssemblyOS)
1095  GEN_VISIT(SgAsmCilAssemblyProcessor)
1096  GEN_VISIT(SgAsmCilAssemblyRef)
1097  GEN_VISIT(SgAsmCilAssemblyRefOS)
1098  GEN_VISIT(SgAsmCilAssemblyRefProcessor)
1099  GEN_VISIT(SgAsmCilClassLayout)
1100  GEN_VISIT(SgAsmCilConstant)
1101  GEN_VISIT(SgAsmCilCustomAttribute)
1102  GEN_VISIT(SgAsmCilDeclSecurity)
1103  GEN_VISIT(SgAsmCilEvent)
1104  GEN_VISIT(SgAsmCilEventMap)
1105  GEN_VISIT(SgAsmCilExportedType)
1106  GEN_VISIT(SgAsmCilField)
1107  GEN_VISIT(SgAsmCilFieldLayout)
1108  GEN_VISIT(SgAsmCilFieldMarshal)
1109  GEN_VISIT(SgAsmCilFieldRVA)
1110  GEN_VISIT(SgAsmCilFile)
1111  GEN_VISIT(SgAsmCilGenericParam)
1113  GEN_VISIT(SgAsmCilImplMap)
1114  GEN_VISIT(SgAsmCilInterfaceImpl)
1115  GEN_VISIT(SgAsmCilManifestResource)
1116  GEN_VISIT(SgAsmCilMemberRef)
1117  GEN_VISIT(SgAsmCilMethodDef)
1118  GEN_VISIT(SgAsmCilMethodImpl)
1119  GEN_VISIT(SgAsmCilMethodSemantics)
1120  GEN_VISIT(SgAsmCilMethodSpec)
1121  GEN_VISIT(SgAsmCilModule)
1122  GEN_VISIT(SgAsmCilModuleRef)
1123  GEN_VISIT(SgAsmCilNestedClass)
1124  GEN_VISIT(SgAsmCilParam)
1125  GEN_VISIT(SgAsmCilProperty)
1126  GEN_VISIT(SgAsmCilPropertyMap)
1127  GEN_VISIT(SgAsmCilStandAloneSig)
1128  GEN_VISIT(SgAsmCilTypeDef)
1129  GEN_VISIT(SgAsmCilTypeRef)
1130  GEN_VISIT(SgAsmCilTypeSpec)
1131  GEN_VISIT(SgAdaParameterList)
1132  GEN_VISIT(SgAsmCilMetadata)
1133  GEN_VISIT(SgAsmCilMetadataRoot)
1134  GEN_VISIT(SgAsmCilDataStream)
1135  GEN_VISIT(SgAsmCilMetadataHeap)
1136  GEN_VISIT(SgAsmCilUint8Heap)
1137  GEN_VISIT(SgAsmCilUint32Heap)
1138  GEN_VISIT(SgAsmCliHeader)
1139 
1140  // incomplete
1141 #endif /* WITH_BINARY_NODES */
1142 
1143 /*
1144  GEN_VISIT(SgBinaryComposite)
1145  GEN_VISIT(SgComprehensionList)
1146  *
1147  GEN_VISIT(SgDirectedGraph)
1148  GEN_VISIT(SgDirectedGraphEdge)
1149  GEN_VISIT(SgDirectedGraphNode)
1150 
1151  GEN_VISIT(SgUnknownMemberFunctionType)
1152 */
1153 
1154  RoseVisitor rv;
1155  };
1156 
1157 #undef GEN_VISIT
1158 
1159  template <class RoseVisitor>
1160  inline
1161  typename std::remove_const<typename std::remove_reference<RoseVisitor>::type>::type
1162  _dispatch(RoseVisitor&& rv, SgNode* n)
1163  {
1164  typedef typename std::remove_reference<RoseVisitor>::type RoseVisitorNoref;
1165  typedef typename std::remove_const<RoseVisitorNoref>::type RoseHandler;
1166 
1167  ROSE_ASSERT(n);
1168 
1169  VisitDispatcher<RoseHandler> vis( std::forward<RoseVisitor>(rv),
1170  std::is_lvalue_reference<RoseVisitor>()
1171  );
1172 
1173  n->accept(vis);
1174  return std::move(vis).rv;
1175  }
1176 
1177 
1233 #if 0
1234 #endif
1245 
1246  template <class RoseVisitor>
1247  inline
1248  typename std::remove_const<typename std::remove_reference<RoseVisitor>::type>::type
1249  dispatch(RoseVisitor&& rv, SgNode* n)
1250  {
1251  //~ return std::move(rv);
1252  return _dispatch(std::forward<RoseVisitor>(rv), n);
1253  }
1254 
1255  template <class RoseVisitor>
1256  inline
1257  typename std::remove_const<typename std::remove_reference<RoseVisitor>::type>::type
1258  dispatch(RoseVisitor&& rv, const SgNode* n)
1259  {
1260  //~ return std::move(rv);
1261  return _dispatch(std::forward<RoseVisitor>(rv), const_cast<SgNode*>(n));
1262  }
1263 
1273  template <class SageNode>
1275  {
1276  void handle(SageNode&) {}
1277  };
1278 
1286  template <class AncestorNode, class QualSgNode>
1287  struct AncestorTypeFinder : DefaultHandler<const SgProject>
1288  {
1290  typedef std::pair<AncestorNode*, QualSgNode*> Pair;
1291 
1292  Pair res;
1293 
1295  : Base(), res(NULL, NULL)
1296  {}
1297 
1298  // handling of const SgProject is outsourced to DefaultHandler
1299  // thus, AncestorNode = const SgProject does not cause conflicts
1300  using Base::handle;
1301 
1302  void handle(QualSgNode& n) { res.second = n.get_parent(); }
1303  void handle(AncestorNode& n) { res.first = &n; }
1304 
1305  operator Pair() const { return res; }
1306  };
1307 
1310  template <class AncestorNode, class QualSgNode>
1311  AncestorNode* _ancestor(QualSgNode& n)
1312  {
1313  typedef AncestorTypeFinder<AncestorNode, QualSgNode> AncestorFinder;
1314 
1315  typename AncestorFinder::Pair res(NULL, n.get_parent());
1316 
1317  while (res.second != NULL)
1318  {
1319  res = (typename AncestorFinder::Pair) sg::dispatch(AncestorFinder(), res.second);
1320  }
1321 
1322  return res.first;
1323  }
1324 
1336  template <class AncestorNode>
1337  AncestorNode* ancestor(SgNode* n)
1338  {
1339  if (n == NULL) return NULL;
1340 
1341  return _ancestor<AncestorNode>(*n);
1342  }
1343 
1345  template <class AncestorNode>
1346  const AncestorNode* ancestor(const SgNode* n)
1347  {
1348  if (n == NULL) return NULL;
1349 
1350  return _ancestor<const AncestorNode>(*n);
1351  }
1352 
1354  template <class AncestorNode>
1355  AncestorNode& ancestor(SgNode& n)
1356  {
1357  AncestorNode* res = _ancestor<AncestorNode>(n);
1358 
1359  ROSE_ASSERT(res);
1360  return *res;
1361  }
1362 
1364  template <class AncestorNode>
1365  const AncestorNode& ancestor(const SgNode& n)
1366  {
1367  const AncestorNode* res = _ancestor<const AncestorNode>(n);
1368 
1369  ROSE_ASSERT(res);
1370  return *res;
1371  }
1372 
1373  namespace
1374  {
1376  template <class SageNode>
1377  struct TypeRecoveryHandler
1378  {
1379  typedef typename ConstLike<SageNode, SgNode>::type SgBaseNode;
1380 
1381  TypeRecoveryHandler(const char* f = 0, size_t ln = 0)
1382  : res(NULL), loc(f), loc_ln(ln)
1383  {}
1384 
1385  TypeRecoveryHandler(TypeRecoveryHandler&&) = default;
1386  TypeRecoveryHandler& operator=(TypeRecoveryHandler&&) = default;
1387 
1388  operator SageNode* ()&& { return res; }
1389 
1390  void handle(SgBaseNode& n) { unexpected_node(n, loc, loc_ln); }
1391  void handle(SageNode& n) { res = &n; }
1392 
1393  private:
1394  SageNode* res;
1395  const char* loc;
1396  size_t loc_ln;
1397 
1398  TypeRecoveryHandler() = delete;
1399  TypeRecoveryHandler(const TypeRecoveryHandler&) = delete;
1400  TypeRecoveryHandler& operator=(const TypeRecoveryHandler&) = delete;
1401  };
1402  }
1403 
1404 
1413  template <class SageNode>
1414  SageNode* assert_sage_type(SgNode* n, const char* f = 0, size_t ln = 0)
1415  {
1416  return sg::dispatch(TypeRecoveryHandler<SageNode>(f, ln), n);
1417  }
1418 
1419  template <class SageNode>
1420  const SageNode* assert_sage_type(const SgNode* n, const char* f = 0, size_t ln = 0)
1421  {
1422  return sg::dispatch(TypeRecoveryHandler<const SageNode>(f, ln), n);
1423  }
1424 
1425  template <class SageNode>
1426  SageNode& assert_sage_type(SgNode& n, const char* f = 0, size_t ln = 0)
1427  {
1428  return *sg::dispatch(TypeRecoveryHandler<SageNode>(f, ln), &n);
1429  }
1430 
1431  template <class SageNode>
1432  const SageNode& assert_sage_type(const SgNode& n, const char* f = 0, size_t ln = 0)
1433  {
1434  return *sg::dispatch(TypeRecoveryHandler<const SageNode>(f, ln), &n);
1435  }
1437 
1438  template <class SageNode>
1439  struct TypeRecovery : DispatchHandler<SageNode*>
1440  {
1441  void handle(SgNode&) { /* res = nullptr; */ }
1442  void handle(SageNode& n) { this->res = &n; }
1443  };
1444 
1445  template <class SageNode>
1446  auto ancestor_path(const SgNode& n) -> SageNode*
1447  {
1449  }
1450 
1451  template <class SageNode, class... SageNodes>
1452  auto ancestor_path(const SgNode& n) -> decltype(ancestor_path<SageNodes...>(n))
1453  {
1454  if (SageNode* parent = ancestor_path<SageNode>(n))
1455  return ancestor_path<SageNodes...>(*parent);
1456 
1457  return nullptr;
1458  }
1459 
1462  static inline
1463  void swap_parent(SgNode* lhs, SgNode* rhs)
1464  {
1465  SgNode* tmp = lhs->get_parent();
1466 
1467  lhs->set_parent(rhs->get_parent());
1468  rhs->set_parent(tmp);
1469  }
1470 
1474  static inline
1475  void swap_parent(void*, void*) {}
1476 
1484  template <class SageNode, class SageChild>
1485  void swap_child(SageNode& lhs, SageNode& rhs, SageChild* (SageNode::*getter) () const, void (SageNode::*setter) (SageChild*))
1486  {
1487  SageChild* lhs_child = (lhs.*getter)();
1488  SageChild* rhs_child = (rhs.*getter)();
1489  ROSE_ASSERT(lhs_child && rhs_child);
1490 
1491  (lhs.*setter)(rhs_child);
1492  (rhs.*setter)(lhs_child);
1493 
1494  swap_parent(lhs_child, rhs_child);
1495  }
1496 
1497 
1500  template <class SageNode>
1502  {
1503  typedef void (*TransformHandlerFn)(SageNode*);
1504 
1505  explicit
1506  TraversalFunction(TransformHandlerFn fun)
1507  : fn(fun)
1508  {}
1509 
1510  void handle(SgNode&) { /* ignore */ }
1511  void handle(SageNode& n) { fn(&n); }
1512 
1513  TransformHandlerFn fn;
1514  };
1515 
1518  template <class SageNode>
1519  static inline
1521  createTraversalFunction(void (* fn)(SageNode*))
1522  {
1523  return TraversalFunction<SageNode>(fn);
1524  }
1525 
1526  //
1527  // function type extractor
1528  // see https://stackoverflow.com/questions/28033251/can-you-extract-types-from-template-parameter-function-signature
1529 
1530 
1531  template <class GVisitor>
1533  {
1534  explicit
1535  TraversalClass(GVisitor gv)
1536  : gvisitor(gv)
1537  //~ : gvisitor(std::move(gv))
1538  {}
1539 
1540  void visit(SgNode* n)
1541  {
1542  gvisitor = sg::dispatch(gvisitor, n);
1543  }
1544 
1545  // GVisitor&& visitor() { return std::move(gvisitor); }
1546  GVisitor visitor() { return gvisitor; }
1547 
1548  GVisitor gvisitor;
1549  };
1550 
1551 
1552 
1559  template <class F>
1560  static inline
1561  F
1562  forAllNodes(F fn, SgNode* root, AstSimpleProcessing::Order order = postorder)
1563  {
1564  ROSE_ASSERT(root);
1565 
1566  TraversalClass<F> tt(fn);
1567  //~ TraversalClass<F> tt(std::move(fn));
1568 
1569  tt.traverse(root, order);
1570  return tt.visitor();
1571  }
1572 
1573  template <class SageNode>
1574  static inline
1575  void
1576  forAllNodes(void (*fn)(SageNode*), SgNode* root, AstSimpleProcessing::Order order = postorder)
1577  {
1578  forAllNodes(createTransformExecutor(fn), root, order);
1579  }
1580 
1581 #if !defined(NDEBUG)
1582  static inline
1583  std::string nodeType(const SgNode& n)
1584  {
1585  return typeid(n).name();
1586  }
1587 
1588  static inline
1589  std::string nodeType(const SgNode* n)
1590  {
1591  if (n == NULL) return "<null>";
1592 
1593  return nodeType(*n);
1594  }
1595 #endif
1596 
1597  template <class GVisitor>
1599  {
1600  explicit
1601  DispatchHelper(GVisitor gv, SgNode* p)
1602  : gvisitor(std::move(gv)), parent(p), cnt(0)
1603  {}
1604 
1605  void operator()(SgNode* n)
1606  {
1607  ++cnt;
1608 
1609 #if 0
1610  if (n == NULL)
1611  {
1612  std::cerr << "succ(" << nodeType(parent) << ", " << cnt << ") is null" << std::endl;
1613  return;
1614  }
1615 #endif
1616 
1617  if (n != NULL) gvisitor = sg::dispatch(std::move(gvisitor), n);
1618  }
1619 
1620  operator GVisitor()&& { return std::move(gvisitor); }
1621 
1622  GVisitor gvisitor;
1623  SgNode* parent;
1624  size_t cnt;
1625  };
1626 
1627 
1628  template <class GVisitor>
1629  static inline
1631  dispatchHelper(GVisitor gv, SgNode* parent = NULL)
1632  {
1633  return DispatchHelper<GVisitor>(std::move(gv), parent);
1634  }
1635 
1636  template <class GVisitor>
1637  static inline
1638  GVisitor traverseChildren(GVisitor gv, SgNode& n)
1639  {
1640  std::vector<SgNode*> successors = n.get_traversalSuccessorContainer();
1641 
1642  return std::for_each(successors.begin(), successors.end(), dispatchHelper(std::move(gv), &n));
1643  }
1644 
1645  template <class GVisitor>
1646  static inline
1647  GVisitor traverseChildren(GVisitor gv, SgNode* n)
1648  {
1649  return traverseChildren(gv, sg::deref(n));
1650  }
1651 
1652  template <class SageParent, class SageChild>
1653  void linkParentChild(SageParent& parent, SageChild& child, void (SageParent::*setter)(SageChild*))
1654  {
1655  (parent.*setter)(&child);
1656  child.set_parent(&parent);
1657  }
1658 
1662  template <class SageNode>
1663  typename SageNode::base_node_type&
1664  asBaseType(SageNode& n) { return n; }
1665 
1666  template <class SageNode>
1667  const typename SageNode::base_node_type&
1668  asBaseType(const SageNode& n) { return n; }
1669 
1670  template <class SageNode>
1671  typename SageNode::base_node_type*
1672  asBaseType(SageNode* n) { return n; }
1673 
1674  template <class SageNode>
1675  const typename SageNode::base_node_type*
1676  asBaseType(const SageNode* n) { return n; }
1678 }
1679 #endif /* _SAGEGENERIC_H */
This class represents modifiers for SgDeclaration (declaration statements).
List of pointers to file sections.
CIL ClassLayout node (II.22.8).
This class represents the notion of an initializer for a variable declaration or expression in a func...
This class represents the concept of a scope in C++ (e.g. global scope, fuction scope, etc.).
The GNU symbol version definitions.
This class represents the concept of a C++ template instantiation directive.
This class represents the concept of an instantiation of member function template or a member functio...
This class represents the concept of a class declaration statement. It includes the concept of an ins...
This class represents the concept of a declaration list.
This class represents a boolean value (expression value).
One entry of the ELF symbol version needed table.
This class represents a OLD concept of the structure require for qualified names when they were in th...
CIL StandAloneSig node (II.22.36).
This class represents the notion of an n-ary comparison operation. This node is intended for use with...
String associated with a binary file.
Expression that adds two operands.
This class represents the concept of an instantiated class template.
This class represents the notion of an value (expression value).
List of dynamic linking section entries.
This class represents the concept of a C or C++ goto statement.
Contiguous region of a file.
This class represents the concept of the dynamic execution of a string, file, or code object...
CIL DeclSecurity node (II.22.11).
This class represents the concept of a C or C++ statement which contains a expression.
JVM ModuleMainClass attribute.
Expression representing a (no-op) unary plus operation.
Base class for references to a machine register.
This class represents the notion of a binary operator. It is derived from a SgExpression because oper...
Expression that performs a right rotate.
Auxiliary info for needed symbol version.
Instruction basic block.
Base class for all binary analysis IR nodes.
This class represents a source file for a project (which may contian many source files and or directo...
List of entries for the ELF symbol version definition table.
This class represents the variable declaration or variable initialization withn a for loop...
One entry of an ELF relocation table.
This class represents the concept of a C++ sequence of catch statements.
This class represents the notion of a unary operator. It is derived from a SgExpression because opera...
Represents the file header of an ELF binary container.
This class represents the GNU extension "statement expression" (thus is non-standard C and C++)...
Class for traversing the AST.
This class represents the C++ throw expression (handled as a unary operator).
This class represents the rhs of a variable declaration which includes an optional assignment (e...
Portable Executable Import Section.
This class represents the concept of a C++ using directive.
AncestorNode * _ancestor(QualSgNode &n)
implements the ancestor search
Definition: sageGeneric.h:1311
This class represents the base class for all types.
List of generic file headers.
CIL AssemblyRef node (II.22.5).
Base class for machine instructions.
This class represents the concept of a do-while statement.
This class represents a Fortran pointer assignment. It is not some weird compound assignment operator...
CIL Managed Code section.
Section table entry.
This class represents the concept of a class name within the compiler.
CIL FieldRVA node (II.22.18).
This class represents the location of the code associated with the IR node in the original source cod...
This class represents the concept of an enum declaration.
CIL AssemblyProcessor node (II.22.4).
Base class for scalar types.
CIL NestedClass node (II.22.32).
List of expression nodes.
This class represents the "this" operator (can be applied to any member data).
Expression that performs an arithmetic, sign-bit preserving right shift.
void set_parent(SgNode *parent)
All nodes in the AST contain a reference to a parent node.
This class represents a string type used for SgStringVal IR node.
This class represents the notion of an n-ary boolean operation. This node is intended for use with Py...
Expression that performs a logical, sign-bit non-preserving right shift.
This class represents the concept of a C style extern "C" declaration. But such information (linkage)...
This class represents the notion of a declared variable.
Strings stored in an ELF or PE container.
This class represents the concept of a member function declaration statement.
Expression that returns the remainder when dividing the first operand by the second.
This class represents the concept of a C and C++ case option (used within a switch statement)...
This class represents the concept of a function declaration statement.
Node to hold a list of symbol node pointers.
Base class for ELF file sections.
This class represents the concept of a C Assembler statement (untested).
This class represents the concept of a scope in C++ (e.g. global scope, fuction scope, etc.).
This class represents the notion of an n-ary operator. This node is intended for use with Python...
Expression representing truncation.
CIL Event node (II.22.13).
Base class for PE sections.
Represents a synthesized function.
This class represents the concept of a C and C++ expression list.
CIL MethodImpl node (II.22.27).
This class represents the "sizeof()" operator (applied to any type).
void swap_child(SageNode &lhs, SageNode &rhs, SageChild *(SageNode::*getter)() const, void(SageNode::*setter)(SageChild *))
swaps children (of equal kind) between two ancestor nodes of the same type
Definition: sageGeneric.h:1485
Expression that divides the first operand by the second.
CIL AssemblyRefProcessor node (II.22.7).
Hods a list of symbol version aux entries.
AncestorNode * ancestor(SgNode *n)
finds an ancestor node with a given type
Definition: sageGeneric.h:1337
CIL SgAsmCilMetadataHeap node.
COFF symbol string table.
Basic information about an executable container.
This class represents the concept of a C++ namespace alias declaration statement. ...
Base class for CIL branch of binary analysis IR nodes.
This class is not used in ROSE, but is intended to represent a list of SgModifierTypes (similar to th...
CIL FieldLayout node (II.22.16).
This class represents the base class of a numbr of IR nodes that don't otherwise fit into the existin...
Entry in an ELF symbol version table.
Base class for string tables.
This class represents a directory within a projects file structure of files and directories.
This class represents the notion of an value (expression value).
Base class for CIL branch of binary analysis IR nodes.
ELF error handling frame entry frame description entry.
CIL ImplMap node (II.22.22).
This class represents the concept of a C trinary conditional expression (e.g. "test ...
Represents an ELF relocation section.
Base class for CIL branch of binary analysis IR nodes.
This class represents the notion of an expression. Expressions are derived from SgLocatedNodes, since similar to statement, expressions have a concrete location within the user's source code.
One import directory per library.
void visit(SgNode *n)
this method is called at every traversed node.
Definition: sageGeneric.h:1540
GNU symbol version requirements table.
List of ELF relocation entries.
This class represents the notion of a break statement (typically used in a switch statment)...
List of AST file node pointers.
This class represents the concept of a name within the compiler.
ELF section containing dynamic linking information.
executes a functor for a specific node type
Definition: sageGeneric.h:1501
Represents the file header for DOS executables.
T & deref(T *ptr, const char *file=0, size_t ln=0)
dereferences an object (= checked dereference in debug mode)
Definition: sageGeneric.h:98
List of ELF EH frame CI entries.
CIL GenericParamConstraint node (II.22.21).
struct DefaultHandler
Definition: sageGeneric.h:1274
Represents an ELF EH frame section.
CIL FieldMarshal node (II.22.17).
CIL MethodSpec node (II.22.29).
One entry of an ELF notes table.
ELF string table section.
CIL SgAsmCilMetadataRoot.
This class represents the concept of a class definition in C++.
This class represents strings within the IR nodes.
Reference to memory locations.
CIL ExportedType node (II.22.14).
projects the constness of T1 on T2
Definition: sageGeneric.h:49
This class is intended to be a wrapper around SgStatements, allowing them to exist in scopes that onl...
struct DispatchHandler
Definition: sageGeneric.h:117
An ordered list of registers.
This class represents the concept of a contructor initializer list (used in constructor (member funct...
Base class for container file headers.
CIL GenericParam node (II.22.20).
CIL MemberRef node (II.22.25).
CIL AssemblyRefOS node (II.22.6).
CIL Module node (II.22.30).
SageNode::base_node_type & asBaseType(SageNode &n)
returns the same node n upcasted to its base type
Definition: sageGeneric.h:1664
Expression represting negation.
List of pointers to other AST nodes.
Expression representing a machine register.
Base class for integer values.
This class represents the concept of a namespace name within the compiler.
This class represents the notion of a typedef declaration.
ELF file section containing symbols.
CIL InterfaceImpl node (II.22.23).
This class represents the notion of an value (expression value).
This class represents the base class for all IR nodes within Sage III.
Definition: Cxx_Grammar.h:9846
List of operands for an instruction.
This class represents the concept of a catch within a try-catch construct used in C++ exception handl...
Base class for dynamically linked library information.
This class represents the notion of an value (expression value).
This class represents the concept of a variable name within the compiler (a shared container for the ...
This class represents a lambda expression.
This class represents the concept of an instantiation of function template.
List of ELF error handling frame descriptor entries.
This class represents the physical disequality (often called pointer disequality) operator for langua...
This class represents the "&" operator (applied to any lvalue).
A single imported object.
This class represents the conversion of an arbitrary expression to a string. This node is intended fo...
Represents one PowerPC machine instruction.
One entry from an ELF symbol version definition table.
Represents a single ELF symbol.
This class represents the base class of a number of IR nodes define modifiers within the C++ grammar...
This class represents the concept of a block (not a basic block from control flow analysis)...
This class represents the concept of a C++ namespace declaration.
CIL TypeRef node (II.22.38).
This class represents a cast of one type to another.
This class represents a list display.
Base class for strings related to binary specimens.
This class represents the notion of a statement.
This class represents the concept of a namespace definition.
This class represents the concept of a for loop.
CIL MethodSemantics node (II.22.28).
DOS exteded header.
CIL TypeDef node (II.22.37).
CIL File node (II.22.19).
List of COFF symbols.
Represents static data in an executable.
This class represents the physical equality (often called pointer equality) operator for languages th...
CIL AssemblyOS node (II.22.3).
Base class for unary expressions.
Base class for many binary analysis nodes.
Represents one Intel x86 machine instruction.
This class represents the concept of a C++ using declaration.
Base class for CIL branch of binary analysis IR nodes.
This class represents a C99 complex type.
Base class for statement-like subclasses.
This class represents a tuple display.
This class represents a type for all functions.
CIL TypeSpec node (II.22.39).
Base class for CIL branch of binary analysis IR nodes.
This class represents the concept of a namespace definition.
This class represents the numeric negation of a value. Not to be confused with SgSubtractOp.
This class represents the concept of a C Assembler statement (untested).
Represents one entry of a segment table.
This class represents the concept of a C or C++ default case within a switch statement.
Expression representing sign extending.
Base class for expressions.
CIL ModuleRef node (II.22.31).
This namespace contains template functions that operate on the ROSE AST.
Definition: sageFunctors.h:15
This class represents a default type used for some IR nodes (see below).
This class represents the concept of an "if" construct.
virtual std::vector< SgNode * > get_traversalSuccessorContainer()
container of pointers to AST successor nodes used in the traversal overridden in every class by gener...
This class represents the concept of a template declaration.
Expression that performs a logical left shift operation.
List of pointers to other nodes.
This class represents the notion of an expression or statement which has a position within the source...
Expression that multiplies two operands.
This class represents template argument within the use of a template to build an instantiation.
Expression that performs a logical left shift operation filling low-order bits with one...
This class represents the variable refernece in expressions.
Represents one MIPS machine instruction.
Node to hold list of ELF note entries.
This class represents the concept of a do-while statement.
CIL CustomAttribute node (II.22.10).
This class represents a OLD concept of the structure require for qualified names when they were in th...
List of entries from a symbol version table.
List of SgAsmPERVASizePair AST nodes.
Expression representing unsigned extending.
Base class for binary types.
This class represents the definition (initialization) of a variable.
This class represents the concept of a class definition in C++.
This class represents the concept of a C++ call to the delete operator.
Export file section.
virtual void accept(ROSE_VisitorPattern &visitor)
support for the classic visitor pattern done in GoF
helper class for _ancestor
Definition: sageGeneric.h:1287
Registers accessed indirectly.
This class represents the concept of a C++ call to the new operator.
This class represents the concept of a C or C++ continue statement.
This class represents an object used to initialize the unparsing.
Base class for values.
CIL ManifestResource node (II.22.24).
Floating-point value.
CIL Assembly node (II.22.2).
This class represents the member function being called and must be assembled in the SgFunctionCall wi...
Windows PE file header.
This class represents modifiers specific to storage.
This class represents the symbol tables used in both SgScopeStatement and the SgFunctionTypeSymbolTab...
CIL Field node (II.22.15).
Expression that subtracts the second operand from the first.
SgNode * get_parent() const
Access function for parent node.
This class represents the function being called and must be assembled in the SgFunctionCall with the ...
std::remove_const< typename std::remove_reference< RoseVisitor >::type >::type dispatch(RoseVisitor &&rv, SgNode *n)
uncovers the type of SgNode and passes it to an function "handle" in RoseVisitor. ...
Definition: sageGeneric.h:1249
CIL EventMap node (II.22.12).
This class represents the concept of try statement within the try-catch support for exception handlin...
Base class for synthesized declarations.
This class represents the concept of a C Assembler statement.
This class represents the concept of a name and a type. It may be renamed in the future to SgTypeSymb...
This class represents a list of associated typedefs for the SgType IR nodes which reference this list...
One entry from the dynamic linking table.
This class represents a source project, with a list of SgFile objects and global information about th...
CIL Constant node (II.22.9).
CIL MethodDef node (II.22.26).
This class represents the concept of a 'global' stmt in Python.
This class represents the function type table (stores all function types so that they can be shared i...
CIL Property node (II.22.34).
This class represents a C99 complex type.
This class represents the concept of a C or C++ variable declaration.
This class represents the call of a class constructor to initialize a variable. For example "Foo foo;...
The ELF symbol version table.
Represents one entry in an ELF section table.
Represents an ELF segment table.
Strings stored in an ELF or PE container.
Represents an ELF section table.
ELF string table.
SageNode * assert_sage_type(SgNode *n, const char *f=0, size_t ln=0)
asserts that n has type SageNode
Definition: sageGeneric.h:1414
A list of imported items.
Represents an interpretation of a binary container.
This class represents the concept of a C or C++ label statement.
CIL PropertyMap node (II.22.35).
List of symbol version needed entries.
Floating point types.
This class is part of the older CC++ concept. It is not a part of C or C++ (this IR node is not used ...
This class represents the concept of a C++ function call (which is an expression).
Base class for binary files.
Base class for binary expressions.
Declaration-like nodes that encapsulate multiple instructions.
Base class for vector types.
This class was part of CC++ support from a long time ago.
Base class for constants.
CIL Param node (II.22.33).
List of symbol version aux entries.
This class represents the concept of a declaration statement.
List of SgAsmInstruction nodes.
This class represents the concept of a generic call expression.
This class represents the concept of a switch.
This class represents the concept of a C++ expression built from a class name.
Static representation of instruction semantics.
A list of PE Import Directories.
ELF error handling frame entry, common information entry.
COFF symbol table.