ROSE 0.11.145.250
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 <Cxx_GrammarVisitorSupport.h>
15#include <type_traits>
16
17#if !defined(NDEBUG)
18#include <typeinfo>
19#include <sstream>
20#endif /* NDEBUG */
21
22#define WITH_BINARY_NODES 0
23#define WITH_UNTYPED_NODES 0
24
25// #include "Cxx_Grammar.h"
26
27// DQ (10/5/2014): We can't include this here.
28// #include "rose.h"
29
30#define SG_UNEXPECTED_NODE(X) (sg::unexpected_node(X, __FILE__, __LINE__))
31#define SG_DEREF(X) (sg::deref(X, __FILE__, __LINE__))
32#define SG_ASSERT_TYPE(SAGENODE, N) (sg::assert_sage_type<SAGENODE>(N, __FILE__, __LINE__))
33#define SG_ERROR_IF(COND, MSG) (sg::report_error_if(COND, MSG, __FILE__, __LINE__))
34
35
37namespace sg
38{
39 //
40 // non sage specific utilities
41
44 template <class T>
45 static inline
46 void unused(const T&) {}
47
49 template <class T1, class T2>
50 struct ConstLike
51 {
52 typedef T2 type;
53 };
54
55 template <class T1, class T2>
56 struct ConstLike<const T1, T2>
57 {
58 typedef const T2 type;
59 };
60
61 //
62 // error reporting
63
65 template <class T, class E>
66 static inline
67 T conv(const E& el)
68 {
69 T res;
70#if !defined(NDEBUG)
71 std::stringstream s;
72
73 s << el;
74 s >> res;
75#endif /* NDEBUG */
76 return res;
77 }
78
79 // \note implemented in SageInterfaceAda.h
80 // \{
81 [[noreturn]]
82 void report_error(std::string desc, const char* file = nullptr, size_t ln = 0);
83
84 [[noreturn]]
85 void unexpected_node(const SgNode& n, const char* file = nullptr, size_t ln = 0);
87
88
89 static inline
90 void report_error_if(bool iserror, const std::string& desc, const char* file = nullptr, size_t ln = 0)
91 {
92 if (!iserror) return;
93
94 report_error(desc, file, ln);
95 }
96
98 template <class T>
99 T& deref(T* ptr, const char* file = 0, size_t ln = 0)
100 {
101 report_error_if(!ptr, "assertion failed: null dereference ", file, ln);
102 return *ptr;
103 }
104
105 template <bool conv>
106 struct ConditionalEnable : std::true_type // enable
107 {};
108
109 template <>
110 struct ConditionalEnable<false> // disable
111 {};
112
113 template <class U, class T>
114 struct EnableConversion : ConditionalEnable<!std::is_same<U,T>::value && std::is_convertible<U,T>::value>
115 {};
116
118 template <class T>
119 struct NotNull
120 {
124 // not explicit to enable auto-conversion
126 : ptr(p)
127 {
128 SG_ERROR_IF(ptr == nullptr, "failed null pointer check.");
129 }
130
131 NotNull(const NotNull&) = default;
132 NotNull& operator=(const NotNull&) = default;
133 ~NotNull() = default;
134
139 template <class U, bool = EnableConversion<U*,T*>::value>
141 : ptr(nn.pointer())
142 {}
143
145 T& operator*() const { return *ptr; }
146
148 T* operator->() const { return ptr; }
149
151 operator T*() const { return ptr; }
152
154 T* pointer() const { return ptr; }
155
156 private:
157 T* ptr; // must be initialized in ctors
158
159 // no default construction
160 NotNull() = delete;
161
162 // NEITHER delete NOR define move ctor/assignment,
163 // to make the compiler use the copy-versions.
164 // NotNull(NotNull&&) = delete;
165 // NotNull& operator(NotNull&&) = delete;
166 };
167
168 template <class T, class U, bool = EnableConversion<U*,T*>::value || EnableConversion<T*,U*>::value>
169 bool operator<(NotNull<T> lhs, NotNull<U> rhs)
170 {
171 return lhs.pointer() < rhs.pointer();
172 }
173
184 template <class _ReturnType>
186 {
187 using ReturnType = _ReturnType;
189
191 : res()
192 {}
193/*
194 DispatchHandler(const ReturnType& defaultval)
195 : res(defaultval)
196 {}
197
198 operator ReturnType() const { return res; }
199*/
200 explicit
201 DispatchHandler(ReturnType defaultval)
202 : res(std::move(defaultval))
203 {}
204
205 operator ReturnType() && { return std::move(res); }
206 protected:
207 ReturnType res;
208 };
209
210
211 //
212 // Sage query functions
213
215 template <class SageNode>
216 static inline
217 SageNode& assume_sage_type(SgNode& n)
218 {
219 return static_cast<SageNode&>(n);
220 }
221
224 template <class SageNode>
225 static inline
226 const SageNode& assume_sage_type(const SgNode& n)
227 {
228 return static_cast<const SageNode&>(n);
229 }
230
231#define GEN_VISIT(X) \
232 void visit(X * n) { rv.handle(*n); }
233
234 template <class RoseVisitor>
236 {
237 // rvalue ctor
238 VisitDispatcher(RoseVisitor&& rosevisitor, std::false_type)
239 : rv(std::move(rosevisitor))
240 {}
241
242 // lvalue ctor
243 VisitDispatcher(const RoseVisitor& rosevisitor, std::true_type)
244 : rv(rosevisitor)
245 {}
246
247 GEN_VISIT(SgAccessModifier)
249 GEN_VISIT(SgAbsOp)
250 GEN_VISIT(SgAdaAccessType)
251 GEN_VISIT(SgAdaAcceptStmt)
252 GEN_VISIT(SgAdaComponentClause)
253 GEN_VISIT(SgAdaDelayStmt)
254 GEN_VISIT(SgAdaEntryDecl)
255 GEN_VISIT(SgAdaExitStmt)
256 GEN_VISIT(SgAdaDiscreteType)
257 GEN_VISIT(SgAdaFloatVal)
258 GEN_VISIT(SgAdaFormalType)
259 GEN_VISIT(SgAdaFormalTypeDecl)
261 GEN_VISIT(SgAdaGenericDecl)
262 GEN_VISIT(SgAdaGenericInstanceDecl)
263 GEN_VISIT(SgAdaGenericDefn)
264 GEN_VISIT(SgAdaIndexConstraint)
265 GEN_VISIT(SgAdaAttributeClause)
266 GEN_VISIT(SgAdaLoopStmt)
267 GEN_VISIT(SgAdaModularType)
268 GEN_VISIT(SgAdaPackageBody)
269 GEN_VISIT(SgAdaPackageBodyDecl)
270 GEN_VISIT(SgAdaPackageSpec)
271 GEN_VISIT(SgAdaPackageSpecDecl)
272 GEN_VISIT(SgAdaPackageSymbol)
273 GEN_VISIT(SgAdaRangeConstraint)
276 GEN_VISIT(SgAdaRenamingDecl)
277 GEN_VISIT(SgAdaSelectStmt)
279 GEN_VISIT(SgAdaSubtype)
280 GEN_VISIT(SgAdaDerivedType)
281 GEN_VISIT(SgAdaAttributeExp)
282 GEN_VISIT(SgAdaTaskBody)
283 GEN_VISIT(SgAdaTaskBodyDecl)
284 GEN_VISIT(SgAdaTaskSpec)
285 GEN_VISIT(SgAdaTaskSpecDecl)
286 GEN_VISIT(SgAdaTaskSymbol)
287 GEN_VISIT(SgAdaRenamingSymbol)
288 GEN_VISIT(SgAdaTaskRefExp)
289 GEN_VISIT(SgAdaRenamingRefExp)
290 GEN_VISIT(SgAdaTaskType)
291 GEN_VISIT(SgAdaTaskTypeDecl)
292 GEN_VISIT(SgAdaTerminateStmt)
293 GEN_VISIT(SgAdaTypeConstraint)
294 GEN_VISIT(SgAddOp)
295 GEN_VISIT(SgAddressOfOp)
296 GEN_VISIT(SgAggregateInitializer)
297 GEN_VISIT(SgAliasSymbol)
298 GEN_VISIT(SgAllocateStatement)
299 GEN_VISIT(SgAndAssignOp)
300 GEN_VISIT(SgAndOp)
301 GEN_VISIT(SgArithmeticIfStatement)
302 GEN_VISIT(SgArrayType)
303 GEN_VISIT(SgArrowExp)
304 GEN_VISIT(SgArrowStarOp)
305 GEN_VISIT(SgAssertStmt)
306 GEN_VISIT(SgAssignInitializer)
307 GEN_VISIT(SgAssignOp)
308 GEN_VISIT(SgAssignStatement)
309 GEN_VISIT(SgAssignedGotoStatement)
310 GEN_VISIT(SgAssociateStatement)
311 GEN_VISIT(SgAsteriskShapeExp)
312 GEN_VISIT(SgAtOp)
313 GEN_VISIT(SgAttribute)
315 GEN_VISIT(SgAutoType)
316 GEN_VISIT(SgAwaitExpression)
317 GEN_VISIT(SgBackspaceStatement)
318 GEN_VISIT(SgBaseClass)
319 GEN_VISIT(SgExpBaseClass)
320 GEN_VISIT(SgBaseClassModifier)
321 GEN_VISIT(SgBasicBlock)
322 GEN_VISIT(SgBidirectionalGraph)
323 GEN_VISIT(SgBinaryOp)
324 GEN_VISIT(SgBitAndOp)
325 GEN_VISIT(SgBitAttribute)
326 GEN_VISIT(SgBitComplementOp)
327 GEN_VISIT(SgBitEqvOp)
328 GEN_VISIT(SgBitOrOp)
329 GEN_VISIT(SgBitXorOp)
330 GEN_VISIT(SgBlockDataStatement)
331 GEN_VISIT(SgBoolValExp)
332 GEN_VISIT(SgBreakStmt)
333 GEN_VISIT(SgBracedInitializer)
335 GEN_VISIT(SgCaseOptionStmt)
336 GEN_VISIT(SgCastExp)
337 GEN_VISIT(SgCatchOptionStmt)
338 GEN_VISIT(SgCatchStatementSeq)
339 GEN_VISIT(SgCharVal)
340 GEN_VISIT(SgChar16Val)
341 GEN_VISIT(SgChar32Val)
342 GEN_VISIT(SgChooseExpression)
343 GEN_VISIT(SgClassDecl_attr)
344 GEN_VISIT(SgClassDeclaration)
345 GEN_VISIT(SgClassDefinition)
346 GEN_VISIT(SgClassNameRefExp)
347 GEN_VISIT(SgClassSymbol)
348 GEN_VISIT(SgClassType)
350 GEN_VISIT(SgClinkageEndStatement)
351 GEN_VISIT(SgClinkageStartStatement)
352 GEN_VISIT(SgCloseStatement)
353 GEN_VISIT(SgColonShapeExp)
354 GEN_VISIT(SgCommaOpExp)
355 GEN_VISIT(SgCommonBlock)
356 GEN_VISIT(SgCommonBlockObject)
357 GEN_VISIT(SgCommonSymbol)
358 GEN_VISIT(SgComplexVal)
359 GEN_VISIT(SgComprehension)
360 GEN_VISIT(SgCompoundAssignOp)
361 GEN_VISIT(SgCompoundInitializer)
362 GEN_VISIT(SgCompoundLiteralExp)
363 GEN_VISIT(SgComputedGotoStatement)
364 GEN_VISIT(SgConcatenationOp)
365 GEN_VISIT(SgConditionalExp)
366 GEN_VISIT(SgConjugateOp)
367 GEN_VISIT(SgConstVolatileModifier)
368 GEN_VISIT(SgConstructorInitializer)
369 GEN_VISIT(SgContainsStatement)
370 GEN_VISIT(SgContinueStmt)
371 GEN_VISIT(SgCtorInitializerList)
372 GEN_VISIT(SgDataStatementGroup)
373 GEN_VISIT(SgDataStatementObject)
374 GEN_VISIT(SgDataStatementValue)
376 GEN_VISIT(SgDeallocateStatement)
377 GEN_VISIT(SgDeclarationModifier)
378 GEN_VISIT(SgDeclarationScope)
379 GEN_VISIT(SgDeclarationStatement)
380 GEN_VISIT(SgDeclType)
381 GEN_VISIT(SgDefaultOptionStmt)
382 GEN_VISIT(SgDefaultSymbol)
384 GEN_VISIT(SgDeleteExp)
385 GEN_VISIT(SgDerivedTypeStatement)
386 GEN_VISIT(SgDesignatedInitializer)
388 GEN_VISIT(SgDictionaryExp)
389 GEN_VISIT(SgDimensionObject)
390 GEN_VISIT(SgDirectory)
391 GEN_VISIT(SgDirectoryList)
392 GEN_VISIT(SgDivAssignOp)
393 GEN_VISIT(SgDivideOp)
394 GEN_VISIT(SgDoWhileStmt)
395 GEN_VISIT(SgDotExp)
396 GEN_VISIT(SgDotStarOp)
397 GEN_VISIT(SgDoubleVal)
398 GEN_VISIT(SgElaboratedTypeModifier)
399 GEN_VISIT(SgElementwiseOp)
400 GEN_VISIT(SgElementwiseAddOp)
401 GEN_VISIT(SgElementwiseDivideOp)
403 GEN_VISIT(SgElementwiseMultiplyOp)
404 GEN_VISIT(SgElementwisePowerOp)
405 GEN_VISIT(SgElementwiseSubtractOp)
406 GEN_VISIT(SgElseDirectiveStatement)
407 GEN_VISIT(SgElseWhereStatement)
409 GEN_VISIT(SgEmptyDeclaration)
411 GEN_VISIT(SgEndfileStatement)
413 GEN_VISIT(SgEntryStatement)
414 GEN_VISIT(SgEnumDeclaration)
415 GEN_VISIT(SgEnumFieldSymbol)
416 GEN_VISIT(SgEnumSymbol)
417 GEN_VISIT(SgEnumType)
418 GEN_VISIT(SgEnumVal)
419 GEN_VISIT(SgEqualityOp)
420 GEN_VISIT(SgEquivalenceStatement)
422 GEN_VISIT(SgExecStatement)
423 GEN_VISIT(SgExponentiationOp)
424 GEN_VISIT(SgExponentiationAssignOp)
425 GEN_VISIT(SgExprListExp)
426 GEN_VISIT(SgExprStatement)
427 GEN_VISIT(SgExpression)
428 GEN_VISIT(SgExpressionRoot)
429 GEN_VISIT(SgFile)
430 GEN_VISIT(SgFileList)
431 GEN_VISIT(SgFloatVal)
432 GEN_VISIT(SgFloat128Val)
433 GEN_VISIT(SgFloat80Val)
434 GEN_VISIT(SgFoldExpression)
435 GEN_VISIT(SgFlushStatement)
436 GEN_VISIT(SgForAllStatement)
437 GEN_VISIT(SgForInitStatement)
438 GEN_VISIT(SgForStatement)
439 GEN_VISIT(SgFormatItem)
440 GEN_VISIT(SgFormatItemList)
441 GEN_VISIT(SgFormatStatement)
442 GEN_VISIT(SgFortranDo)
443 GEN_VISIT(SgFortranIncludeLine)
444 GEN_VISIT(SgFortranNonblockedDo)
445 GEN_VISIT(SgFuncDecl_attr)
446 GEN_VISIT(SgFunctionCallExp)
447 GEN_VISIT(SgFunctionDeclaration)
448 GEN_VISIT(SgFunctionDefinition)
449 GEN_VISIT(SgFunctionParameterScope)
450 GEN_VISIT(SgFunctionModifier)
451 GEN_VISIT(SgFunctionParameterList)
454 GEN_VISIT(SgFunctionRefExp)
455 GEN_VISIT(SgFunctionSymbol)
456 GEN_VISIT(SgFunctionType)
457 GEN_VISIT(SgFunctionTypeSymbol)
458 GEN_VISIT(SgFunctionTypeTable)
459 GEN_VISIT(SgTypeTable)
460 GEN_VISIT(SgGlobal)
461 GEN_VISIT(SgGotoStatement)
462 GEN_VISIT(SgGraph)
463 GEN_VISIT(SgGraphEdge)
464 GEN_VISIT(SgGraphEdgeList)
465 GEN_VISIT(SgGraphNode)
466 GEN_VISIT(SgGraphNodeList)
467 GEN_VISIT(SgGreaterOrEqualOp)
468 GEN_VISIT(SgGreaterThanOp)
469 GEN_VISIT(SgIOItemExpression)
470 GEN_VISIT(SgIOStatement)
472 GEN_VISIT(SgIfDirectiveStatement)
473 GEN_VISIT(SgIfStmt)
476 GEN_VISIT(SgImageControlStatement)
477 GEN_VISIT(SgImagPartOp)
478 GEN_VISIT(SgImplicitStatement)
479 GEN_VISIT(SgImpliedDo)
480 GEN_VISIT(SgImportStatement)
481 GEN_VISIT(SgIncidenceDirectedGraph)
484 GEN_VISIT(SgIncludeFile)
486 GEN_VISIT(SgInitializedName)
487 GEN_VISIT(SgInitializer)
488 GEN_VISIT(SgInquireStatement)
490 GEN_VISIT(SgIntVal)
491 GEN_VISIT(SgIntegerDivideOp)
492 GEN_VISIT(SgIntegerDivideAssignOp)
493 GEN_VISIT(SgInterfaceBody)
494 GEN_VISIT(SgHeaderFileBody)
495 GEN_VISIT(SgHeaderFileReport)
496 GEN_VISIT(SgInterfaceStatement)
497 GEN_VISIT(SgInterfaceSymbol)
498 GEN_VISIT(SgIntrinsicSymbol)
499 GEN_VISIT(SgIsOp)
500 GEN_VISIT(SgIsNotOp)
501 GEN_VISIT(SgIorAssignOp)
502 GEN_VISIT(SgJovialBitType)
503 GEN_VISIT(SgJovialBitVal)
504 GEN_VISIT(SgJovialTableType)
505 GEN_VISIT(SgJovialCompoolStatement)
506 GEN_VISIT(SgJovialForThenStatement)
510 GEN_VISIT(SgJovialTablePresetExp)
511 GEN_VISIT(SgJovialTableStatement)
512 GEN_VISIT(SgKeyDatumPair)
513 GEN_VISIT(SgCudaKernelExecConfig)
514 GEN_VISIT(SgCudaKernelCallExp)
515 GEN_VISIT(SgLabelRefExp)
516 GEN_VISIT(SgLabelStatement)
517 GEN_VISIT(SgJavaLabelStatement)
518 GEN_VISIT(SgLabelSymbol)
519 GEN_VISIT(SgJavaLabelSymbol)
520 GEN_VISIT(SgLambdaCapture)
521 GEN_VISIT(SgLambdaCaptureList)
522 GEN_VISIT(SgLambdaExp)
523 GEN_VISIT(SgLambdaRefExp)
524 GEN_VISIT(SgLeftDivideOp)
525 GEN_VISIT(SgLessOrEqualOp)
526 GEN_VISIT(SgLessThanOp)
527 GEN_VISIT(SgLineDirectiveStatement)
529 GEN_VISIT(SgLinkageModifier)
530 GEN_VISIT(SgListComprehension)
531 GEN_VISIT(SgListExp)
532 GEN_VISIT(SgLocatedNode)
533 GEN_VISIT(SgLocatedNodeSupport)
534 GEN_VISIT(SgLongDoubleVal)
535 GEN_VISIT(SgLongIntVal)
536 GEN_VISIT(SgLongLongIntVal)
537 GEN_VISIT(SgLshiftAssignOp)
538 GEN_VISIT(SgLshiftOp)
539 GEN_VISIT(SgMagicColonExp)
540 GEN_VISIT(SgMatrixExp)
541 GEN_VISIT(SgMatrixTransposeOp)
542 GEN_VISIT(SgMatlabForStatement)
544 GEN_VISIT(SgMemberFunctionRefExp)
545 GEN_VISIT(SgMemberFunctionSymbol)
546 GEN_VISIT(SgMemberFunctionType)
547 GEN_VISIT(SgMembershipOp)
549 GEN_VISIT(SgMinusAssignOp)
550 GEN_VISIT(SgMinusMinusOp)
551 GEN_VISIT(SgMinusOp)
552 GEN_VISIT(SgModAssignOp)
553 GEN_VISIT(SgModOp)
554 GEN_VISIT(SgModifier)
555 GEN_VISIT(SgModifierNodes)
556 GEN_VISIT(SgModifierType)
557 GEN_VISIT(SgModuleStatement)
558 GEN_VISIT(SgModuleSymbol)
559 GEN_VISIT(SgMultAssignOp)
560 GEN_VISIT(SgMultiplyOp)
561 GEN_VISIT(SgName)
562 GEN_VISIT(SgNameGroup)
563 GEN_VISIT(SgNamedType)
564 GEN_VISIT(SgNamelistStatement)
568 GEN_VISIT(SgNamespaceSymbol)
569 GEN_VISIT(SgNaryOp)
570 GEN_VISIT(SgNaryBooleanOp)
571 GEN_VISIT(SgNaryComparisonOp)
572 GEN_VISIT(SgNewExp)
573 GEN_VISIT(SgNode)
574 GEN_VISIT(SgNoexceptOp)
575 GEN_VISIT(SgNotEqualOp)
576 GEN_VISIT(SgNotOp)
577 GEN_VISIT(SgNonMembershipOp)
578 GEN_VISIT(SgNonrealDecl)
579 GEN_VISIT(SgNonrealRefExp)
580 GEN_VISIT(SgNonrealSymbol)
581 GEN_VISIT(SgNonrealType)
582 GEN_VISIT(SgNonrealBaseClass)
583 GEN_VISIT(SgNullExpression)
584 GEN_VISIT(SgNullptrValExp)
585 GEN_VISIT(SgNullStatement)
586 GEN_VISIT(SgNullifyStatement)
587 GEN_VISIT(SgOmpAtomicStatement)
588 GEN_VISIT(SgOmpBarrierStatement)
589 GEN_VISIT(SgOmpCriticalStatement)
590 GEN_VISIT(SgOmpClauseBodyStatement)
591 GEN_VISIT(SgOmpBodyStatement)
592 GEN_VISIT(SgOmpDoStatement)
593 GEN_VISIT(SgOmpFlushStatement)
595 GEN_VISIT(SgOmpForStatement)
596 GEN_VISIT(SgOmpForSimdStatement)
597 GEN_VISIT(SgOmpMasterStatement)
598 GEN_VISIT(SgOmpOrderedStatement)
599 GEN_VISIT(SgOmpParallelStatement)
600 GEN_VISIT(SgOmpSectionStatement)
601 GEN_VISIT(SgOmpSectionsStatement)
602 GEN_VISIT(SgOmpSingleStatement)
603 GEN_VISIT(SgOmpTaskStatement)
604 GEN_VISIT(SgOmpTaskwaitStatement)
606 GEN_VISIT(SgOmpWorkshareStatement)
607 GEN_VISIT(SgOmpTargetStatement)
608 GEN_VISIT(SgOmpTargetDataStatement)
609 GEN_VISIT(SgOmpSimdStatement)
610 GEN_VISIT(SgOmpClause)
611 GEN_VISIT(SgOmpBeginClause)
612 GEN_VISIT(SgOmpCollapseClause)
613 GEN_VISIT(SgOmpCopyinClause)
614 GEN_VISIT(SgOmpCopyprivateClause)
615 GEN_VISIT(SgOmpDefaultClause)
616 GEN_VISIT(SgOmpEndClause)
617 GEN_VISIT(SgOmpExpressionClause)
618 GEN_VISIT(SgOmpFirstprivateClause)
619 GEN_VISIT(SgOmpIfClause)
620 GEN_VISIT(SgOmpFinalClause)
621 GEN_VISIT(SgOmpPriorityClause)
622 GEN_VISIT(SgOmpDeviceClause)
623 GEN_VISIT(SgOmpLastprivateClause)
624 GEN_VISIT(SgOmpNowaitClause)
625 GEN_VISIT(SgOmpNumThreadsClause)
626 GEN_VISIT(SgOmpOrderedClause)
627 GEN_VISIT(SgOmpPrivateClause)
628 GEN_VISIT(SgOmpReductionClause)
629 GEN_VISIT(SgOmpScheduleClause)
630 GEN_VISIT(SgOmpSharedClause)
631 GEN_VISIT(SgOmpUntiedClause)
632 GEN_VISIT(SgOmpMergeableClause)
633 GEN_VISIT(SgOmpVariablesClause)
634 GEN_VISIT(SgOmpMapClause)
635 GEN_VISIT(SgOmpSafelenClause)
636 GEN_VISIT(SgOmpSimdlenClause)
637 GEN_VISIT(SgOmpLinearClause)
638 GEN_VISIT(SgOmpUniformClause)
639 GEN_VISIT(SgOmpAlignedClause)
640 GEN_VISIT(SgOmpProcBindClause)
641 GEN_VISIT(SgOmpAtomicClause)
642 GEN_VISIT(SgOmpInbranchClause)
643 GEN_VISIT(SgOmpNotinbranchClause)
644 GEN_VISIT(SgOmpDependClause)
646 GEN_VISIT(SgOpenStatement)
647 GEN_VISIT(SgOptions)
648 GEN_VISIT(SgOrOp)
649 GEN_VISIT(SgParameterStatement)
651 GEN_VISIT(SgPartialFunctionType)
652 GEN_VISIT(SgPassStatement)
653 GEN_VISIT(SgPlusAssignOp)
654 GEN_VISIT(SgPlusPlusOp)
655 GEN_VISIT(SgPntrArrRefExp)
656 GEN_VISIT(SgPointerAssignOp)
657 GEN_VISIT(SgPointerDerefExp)
658 GEN_VISIT(SgPointerMemberType)
659 GEN_VISIT(SgPointerType)
660 GEN_VISIT(SgPowerOp)
661 GEN_VISIT(SgPragma)
662 GEN_VISIT(SgPragmaDeclaration)
663 GEN_VISIT(SgPrintStatement)
665 GEN_VISIT(SgProgramHeaderStatement)
666 GEN_VISIT(SgProject)
667 GEN_VISIT(SgPseudoDestructorRefExp)
668 GEN_VISIT(SgPythonGlobalStmt)
669 GEN_VISIT(SgPythonPrintStmt)
670 GEN_VISIT(SgQualifiedName)
671 GEN_VISIT(SgQualifiedNameType)
672 GEN_VISIT(SgRangeExp)
673 GEN_VISIT(SgRangeBasedForStatement)
674 GEN_VISIT(SgReadStatement)
675 GEN_VISIT(SgRealPartOp)
676 GEN_VISIT(SgRefExp)
677 GEN_VISIT(SgReferenceType)
678 GEN_VISIT(SgRemOp)
679 GEN_VISIT(SgRenamePair)
680 GEN_VISIT(SgRenameSymbol)
681 GEN_VISIT(SgReplicationOp)
682 GEN_VISIT(SgReturnStmt)
683 GEN_VISIT(SgRewindStatement)
684 GEN_VISIT(SgRshiftAssignOp)
685 GEN_VISIT(SgRshiftOp)
686 GEN_VISIT(SgRvalueReferenceType)
688 GEN_VISIT(SgJavaUnsignedRshiftOp)
689 GEN_VISIT(SgScopeOp)
690 GEN_VISIT(SgScopeStatement)
691 GEN_VISIT(SgSequenceStatement)
692 GEN_VISIT(SgSetComprehension)
693 GEN_VISIT(SgShortVal)
694 GEN_VISIT(SgSizeOfOp)
695 GEN_VISIT(SgAlignOfOp)
696 GEN_VISIT(SgJavaInstanceOfOp)
697 GEN_VISIT(SgSourceFile)
698 GEN_VISIT(SgSpaceshipOp)
699 GEN_VISIT(SgSpawnStmt)
700 GEN_VISIT(SgSyncAllStatement)
701 GEN_VISIT(SgSyncImagesStatement)
702 GEN_VISIT(SgSyncMemoryStatement)
703 GEN_VISIT(SgSyncTeamStatement)
704 GEN_VISIT(SgLockStatement)
705 GEN_VISIT(SgUnlockStatement)
706 GEN_VISIT(SgJavaThrowStatement)
707 GEN_VISIT(SgJavaForEachStatement)
709 GEN_VISIT(SgJavaParameterizedType)
710 GEN_VISIT(SgJavaWildcardType)
713 GEN_VISIT(SgStatement)
716 GEN_VISIT(SgStatementExpression)
718 GEN_VISIT(SgStorageModifier)
719 GEN_VISIT(SgStringConversion)
721 GEN_VISIT(SgStringVal)
722 GEN_VISIT(SgStructureModifier)
723 GEN_VISIT(SgSubscriptExpression)
724 GEN_VISIT(SgSubtractOp)
725 GEN_VISIT(SgSupport)
726 GEN_VISIT(SgSwitchStatement)
727 GEN_VISIT(SgSymbol)
728 GEN_VISIT(SgSymbolTable)
729 GEN_VISIT(SgTemplateArgument)
730 GEN_VISIT(SgTemplateArgumentList)
731 GEN_VISIT(SgTemplateDeclaration)
733 GEN_VISIT(SgTemplateClassSymbol)
735 GEN_VISIT(SgTemplateFunctionRefExp)
736 GEN_VISIT(SgTemplateFunctionSymbol)
741 GEN_VISIT(SgTemplateTypedefSymbol)
743 GEN_VISIT(SgTemplateVariableSymbol)
752 GEN_VISIT(SgTemplateParameter)
753 GEN_VISIT(SgTemplateParameterVal)
754 GEN_VISIT(SgTemplateParameterList)
755 GEN_VISIT(SgTemplateSymbol)
756 GEN_VISIT(SgTemplateType)
757 GEN_VISIT(SgThisExp)
759 GEN_VISIT(SgSuperExp)
760 GEN_VISIT(SgThrowOp)
761 GEN_VISIT(SgToken)
762 GEN_VISIT(SgTryStmt)
763 GEN_VISIT(SgTupleExp)
764 GEN_VISIT(SgType)
765 GEN_VISIT(SgTypeBool)
766 GEN_VISIT(SgTypeChar)
767 GEN_VISIT(SgTypeChar16)
768 GEN_VISIT(SgTypeChar32)
769 GEN_VISIT(SgTypeComplex)
770 GEN_VISIT(SgTypeDefault)
771 GEN_VISIT(SgTypeExpression)
772 GEN_VISIT(SgTypeLabel)
773 GEN_VISIT(SgTypeDouble)
774 GEN_VISIT(SgTypeEllipse)
775 GEN_VISIT(SgTypeFixed)
776 GEN_VISIT(SgTypeFloat)
777 GEN_VISIT(SgTypeFloat128)
778 GEN_VISIT(SgTypeFloat80)
779 GEN_VISIT(SgTypeGlobalVoid)
780 GEN_VISIT(SgTypeIdOp)
781 GEN_VISIT(SgTypeImaginary)
782 GEN_VISIT(SgTypeInt)
783 GEN_VISIT(SgTypeLong)
784 GEN_VISIT(SgTypeLongDouble)
785 GEN_VISIT(SgTypeLongLong)
786 GEN_VISIT(SgTypeModifier)
787 GEN_VISIT(SgTypeMatrix)
788 GEN_VISIT(SgTypeTuple)
789 GEN_VISIT(SgTypeNullptr)
790 GEN_VISIT(SgTypeOfType)
791 GEN_VISIT(SgTypeShort)
793 GEN_VISIT(SgTypeSignedChar)
794 GEN_VISIT(SgTypeSignedInt)
795 GEN_VISIT(SgTypeSignedLong)
796 GEN_VISIT(SgTypeSignedLongLong)
797 GEN_VISIT(SgTypeSignedShort)
798 GEN_VISIT(SgTypeString)
799 GEN_VISIT(SgTypeUnknown)
801 GEN_VISIT(SgTypeUnsignedChar)
802 GEN_VISIT(SgTypeUnsignedInt)
803 GEN_VISIT(SgTypeUnsignedLong)
804 GEN_VISIT(SgTypeUnsignedLongLong)
805 GEN_VISIT(SgTypeUnsignedShort)
806 GEN_VISIT(SgTypeVoid)
807 GEN_VISIT(SgTypeWchar)
808 GEN_VISIT(SgTypedefDeclaration)
809 GEN_VISIT(SgTypedefSeq)
810 GEN_VISIT(SgTypedefSymbol)
811 GEN_VISIT(SgTypedefType)
812 GEN_VISIT(SgUPC_AccessModifier)
813 GEN_VISIT(SgUnaryAddOp)
814 GEN_VISIT(SgUnaryOp)
816 GEN_VISIT(SgUndirectedGraphEdge)
818 GEN_VISIT(SgUnknownFile)
819 GEN_VISIT(SgUnparse_Info)
820 GEN_VISIT(SgSignedCharVal)
821 GEN_VISIT(SgUnsignedCharVal)
822 GEN_VISIT(SgUnsignedIntVal)
823 GEN_VISIT(SgUnsignedLongLongIntVal)
824 GEN_VISIT(SgUnsignedLongVal)
825 GEN_VISIT(SgUnsignedShortVal)
826 GEN_VISIT(SgUpcBarrierStatement)
829 GEN_VISIT(SgUpcFenceStatement)
830 GEN_VISIT(SgUpcForAllStatement)
832 GEN_VISIT(SgUpcMythread)
833 GEN_VISIT(SgUpcNotifyStatement)
834 GEN_VISIT(SgUpcThreads)
835 GEN_VISIT(SgUpcWaitStatement)
836 GEN_VISIT(SgUseStatement)
837 GEN_VISIT(SgUserDefinedBinaryOp)
838 GEN_VISIT(SgUserDefinedUnaryOp)
841 GEN_VISIT(SgValueExp)
842 GEN_VISIT(SgVarArgCopyOp)
843 GEN_VISIT(SgVarArgEndOp)
844 GEN_VISIT(SgVarArgOp)
846 GEN_VISIT(SgVarArgStartOp)
847 GEN_VISIT(SgVarRefExp)
848 GEN_VISIT(SgVariableDeclaration)
849 GEN_VISIT(SgVariableDefinition)
850 GEN_VISIT(SgVariableSymbol)
851 GEN_VISIT(SgVariantExpression)
852 GEN_VISIT(SgVariantStatement)
853 GEN_VISIT(SgVoidVal)
854 GEN_VISIT(SgWaitStatement)
856 GEN_VISIT(SgWithStatement)
857 GEN_VISIT(SgWcharVal)
858 GEN_VISIT(SgWhereStatement)
859 GEN_VISIT(SgWhileStmt)
860 GEN_VISIT(SgWriteStatement)
861 GEN_VISIT(SgXorAssignOp)
862 GEN_VISIT(SgYieldExpression)
863 GEN_VISIT(Sg_File_Info)
864 GEN_VISIT(SgTypeCAFTeam)
865 GEN_VISIT(SgCAFWithTeamStatement)
866 GEN_VISIT(SgCAFCoExpression)
867 GEN_VISIT(SgCallExpression)
868 GEN_VISIT(SgTypeCrayPointer)
869 GEN_VISIT(SgJavaImportStatement)
870 GEN_VISIT(SgJavaPackageDeclaration)
871 GEN_VISIT(SgJavaPackageStatement)
874 GEN_VISIT(SgJavaMemberValuePair)
875 GEN_VISIT(SgJavaAnnotation)
876 GEN_VISIT(SgJavaMarkerAnnotation)
878 GEN_VISIT(SgJavaNormalAnnotation)
879 GEN_VISIT(SgJavaTypeExpression)
880 GEN_VISIT(SgJavaQualifiedType)
881 GEN_VISIT(SgClassExp)
882 GEN_VISIT(SgJavaUnionType)
883 GEN_VISIT(SgJavaParameterType)
884 GEN_VISIT(SgAsyncStmt)
885 GEN_VISIT(SgFinishStmt)
886 GEN_VISIT(SgAtStmt)
887 GEN_VISIT(SgAtomicStmt)
888// GEN_VISIT(SgClassPropertyList)
889 GEN_VISIT(SgWhenStmt)
890 GEN_VISIT(SgAtExp)
891 GEN_VISIT(SgFinishExp)
892 GEN_VISIT(SgHereExp)
893 GEN_VISIT(SgDotDotExp)
894 GEN_VISIT(SgAdaOthersExp)
895 GEN_VISIT(SgAdaUnitRefExp)
897 GEN_VISIT(SgAdaDiscriminatedType)
899 GEN_VISIT(SgAdaGenericSymbol)
900
901 GEN_VISIT(SgAdaProtectedBody)
902 GEN_VISIT(SgAdaProtectedBodyDecl)
903 GEN_VISIT(SgAdaProtectedSpec)
904 GEN_VISIT(SgAdaProtectedSpecDecl)
905 GEN_VISIT(SgAdaProtectedSymbol)
906 GEN_VISIT(SgAdaProtectedRefExp)
907 GEN_VISIT(SgAdaProtectedType)
908 GEN_VISIT(SgAdaProtectedTypeDecl)
909 GEN_VISIT(SgAdaDigitsConstraint)
910 GEN_VISIT(SgAdaAncestorInitializer)
911 GEN_VISIT(SgAdaDeltaConstraint)
912 GEN_VISIT(SgAdaSubroutineType)
914 GEN_VISIT(SgAdaFormalPackageDecl)
915 GEN_VISIT(SgAdaFormalPackageSymbol)
916 GEN_VISIT(SgAdaNullConstraint)
917 GEN_VISIT(SgAdaUnscopedBlock)
918 GEN_VISIT(SgAdaVariantDecl)
919 GEN_VISIT(SgAdaVariantWhenStmt)
920 GEN_VISIT(SgJovialLabelDeclaration)
921
922 GEN_VISIT(SgRangeType)
923
924#if WITH_BINARY_NODES
925 GEN_VISIT(SgAsmAarch64AtOperand)
926 GEN_VISIT(SgAsmAarch64BarrierOperand)
927 GEN_VISIT(SgAsmAarch64CImmediateOperand)
928 GEN_VISIT(SgAsmAarch64Instruction)
929 GEN_VISIT(SgAsmAarch64PrefetchOperand)
930 GEN_VISIT(SgAsmAarch64SysMoveOperand)
931 GEN_VISIT(SgAsmBasicString)
932 GEN_VISIT(SgAsmBinaryAdd)
933 GEN_VISIT(SgAsmBinaryAddPostupdate)
934 GEN_VISIT(SgAsmBinaryAddPreupdate)
935 GEN_VISIT(SgAsmBinaryAsr)
936 GEN_VISIT(SgAsmBinaryDivide)
937 GEN_VISIT(SgAsmBinaryExpression)
938 GEN_VISIT(SgAsmBinaryLsl)
939 GEN_VISIT(SgAsmBinaryLsr)
940 GEN_VISIT(SgAsmBinaryMod)
941 GEN_VISIT(SgAsmBinaryMsl)
942 GEN_VISIT(SgAsmBinaryMultiply)
943 GEN_VISIT(SgAsmBinaryRor)
944 GEN_VISIT(SgAsmBinarySubtract)
945 GEN_VISIT(SgAsmBinarySubtractPostupdate)
946 GEN_VISIT(SgAsmBinarySubtractPreupdate)
947 GEN_VISIT(SgAsmBlock)
948 GEN_VISIT(SgAsmCoffStrtab)
949 GEN_VISIT(SgAsmCoffSymbol)
950 GEN_VISIT(SgAsmCoffSymbolList)
951 GEN_VISIT(SgAsmCoffSymbolTable)
952 GEN_VISIT(SgAsmCommonSubExpression)
954 GEN_VISIT(SgAsmConstantExpression)
955 GEN_VISIT(SgAsmDOSExtendedHeader)
956 GEN_VISIT(SgAsmDOSFileHeader)
961 GEN_VISIT(SgAsmDwarfArrayType)
962 GEN_VISIT(SgAsmDwarfBaseType)
963 GEN_VISIT(SgAsmDwarfCatchBlock)
964 GEN_VISIT(SgAsmDwarfClassTemplate)
965 GEN_VISIT(SgAsmDwarfClassType)
966 GEN_VISIT(SgAsmDwarfCommonBlock)
970 GEN_VISIT(SgAsmDwarfCondition)
971 GEN_VISIT(SgAsmDwarfConstType)
972 GEN_VISIT(SgAsmDwarfConstant)
973 GEN_VISIT(SgAsmDwarfConstruct)
974 GEN_VISIT(SgAsmDwarfConstructList)
975 GEN_VISIT(SgAsmDwarfDwarfProcedure)
976 GEN_VISIT(SgAsmDwarfEntryPoint)
978 GEN_VISIT(SgAsmDwarfEnumerator)
979 GEN_VISIT(SgAsmDwarfFileType)
981 GEN_VISIT(SgAsmDwarfFormatLabel)
982 GEN_VISIT(SgAsmDwarfFriend)
985 GEN_VISIT(SgAsmDwarfImportedModule)
986 GEN_VISIT(SgAsmDwarfImportedUnit)
987 GEN_VISIT(SgAsmDwarfInformation)
988 GEN_VISIT(SgAsmDwarfInheritance)
990 GEN_VISIT(SgAsmDwarfInterfaceType)
991 GEN_VISIT(SgAsmDwarfLabel)
992 GEN_VISIT(SgAsmDwarfLexicalBlock)
993 GEN_VISIT(SgAsmDwarfLine)
994 GEN_VISIT(SgAsmDwarfLineList)
995 GEN_VISIT(SgAsmDwarfMacro)
996 GEN_VISIT(SgAsmDwarfMacroList)
997 GEN_VISIT(SgAsmDwarfMember)
998 GEN_VISIT(SgAsmDwarfModule)
999 GEN_VISIT(SgAsmDwarfMutableType)
1000 GEN_VISIT(SgAsmDwarfNamelist)
1001 GEN_VISIT(SgAsmDwarfNamelistItem)
1002 GEN_VISIT(SgAsmDwarfNamespace)
1003 GEN_VISIT(SgAsmDwarfPackedType)
1004 GEN_VISIT(SgAsmDwarfPartialUnit)
1005 GEN_VISIT(SgAsmDwarfPointerType)
1006 GEN_VISIT(SgAsmDwarfPtrToMemberType)
1007 GEN_VISIT(SgAsmDwarfReferenceType)
1008 GEN_VISIT(SgAsmDwarfRestrictType)
1009 GEN_VISIT(SgAsmDwarfSetType)
1010 GEN_VISIT(SgAsmDwarfSharedType)
1011 GEN_VISIT(SgAsmDwarfStringType)
1012 GEN_VISIT(SgAsmDwarfStructureType)
1013 GEN_VISIT(SgAsmDwarfSubprogram)
1014 GEN_VISIT(SgAsmDwarfSubrangeType)
1015 GEN_VISIT(SgAsmDwarfSubroutineType)
1018 GEN_VISIT(SgAsmDwarfThrownType)
1019 GEN_VISIT(SgAsmDwarfTryBlock)
1020 GEN_VISIT(SgAsmDwarfTypedef)
1021 GEN_VISIT(SgAsmDwarfUnionType)
1024 GEN_VISIT(SgAsmDwarfUnspecifiedType)
1025 GEN_VISIT(SgAsmDwarfUpcRelaxedType)
1026 GEN_VISIT(SgAsmDwarfUpcSharedType)
1027 GEN_VISIT(SgAsmDwarfUpcStrictType)
1028 GEN_VISIT(SgAsmDwarfVariable)
1029 GEN_VISIT(SgAsmDwarfVariant)
1030 GEN_VISIT(SgAsmDwarfVariantPart)
1031 GEN_VISIT(SgAsmDwarfVolatileType)
1032 GEN_VISIT(SgAsmDwarfWithStmt)
1033 GEN_VISIT(SgAsmElfDynamicEntry)
1034 GEN_VISIT(SgAsmElfDynamicEntryList)
1035 GEN_VISIT(SgAsmElfDynamicSection)
1036 GEN_VISIT(SgAsmElfEHFrameEntryCI)
1038 GEN_VISIT(SgAsmElfEHFrameEntryFD)
1040 GEN_VISIT(SgAsmElfEHFrameSection)
1041 GEN_VISIT(SgAsmElfFileHeader)
1042 GEN_VISIT(SgAsmElfNoteEntry)
1043 GEN_VISIT(SgAsmElfNoteEntryList)
1044 GEN_VISIT(SgAsmElfNoteSection)
1045 GEN_VISIT(SgAsmElfRelocEntry)
1046 GEN_VISIT(SgAsmElfRelocEntryList)
1047 GEN_VISIT(SgAsmElfRelocSection)
1048 GEN_VISIT(SgAsmElfSection)
1049 GEN_VISIT(SgAsmElfSectionTable)
1050 GEN_VISIT(SgAsmElfSectionTableEntry)
1051 GEN_VISIT(SgAsmElfSegmentTable)
1052 GEN_VISIT(SgAsmElfSegmentTableEntry)
1054 GEN_VISIT(SgAsmElfStringSection)
1055 GEN_VISIT(SgAsmElfStrtab)
1056 GEN_VISIT(SgAsmElfSymbol)
1057 GEN_VISIT(SgAsmElfSymbolList)
1058 GEN_VISIT(SgAsmElfSymbolSection)
1059 GEN_VISIT(SgAsmElfSymverDefinedAux)
1064 GEN_VISIT(SgAsmElfSymverEntry)
1065 GEN_VISIT(SgAsmElfSymverEntryList)
1066 GEN_VISIT(SgAsmElfSymverNeededAux)
1068 GEN_VISIT(SgAsmElfSymverNeededEntry)
1071 GEN_VISIT(SgAsmElfSymverSection)
1072 GEN_VISIT(SgAsmExecutableFileFormat)
1073 GEN_VISIT(SgAsmExprListExp)
1074 GEN_VISIT(SgAsmExpression)
1076 GEN_VISIT(SgAsmFloatType)
1077 GEN_VISIT(SgAsmFloatValueExpression)
1078 GEN_VISIT(SgAsmFunction)
1079 GEN_VISIT(SgAsmGenericDLL)
1080 GEN_VISIT(SgAsmGenericDLLList)
1081 GEN_VISIT(SgAsmGenericFile)
1082 GEN_VISIT(SgAsmGenericFileList)
1083 GEN_VISIT(SgAsmGenericFormat)
1084 GEN_VISIT(SgAsmGenericHeader)
1085 GEN_VISIT(SgAsmGenericHeaderList)
1086 GEN_VISIT(SgAsmGenericSection)
1087 GEN_VISIT(SgAsmGenericSectionList)
1088 GEN_VISIT(SgAsmGenericString)
1089 GEN_VISIT(SgAsmGenericStrtab)
1090 GEN_VISIT(SgAsmGenericSymbol)
1091 GEN_VISIT(SgAsmGenericSymbolList)
1093 GEN_VISIT(SgAsmInstruction)
1095 GEN_VISIT(SgAsmIntegerType)
1096 GEN_VISIT(SgAsmInterpretation)
1097 GEN_VISIT(SgAsmInterpretationList)
1098 GEN_VISIT(SgAsmLEEntryPoint)
1099 GEN_VISIT(SgAsmLEEntryTable)
1100 GEN_VISIT(SgAsmLEFileHeader)
1101 GEN_VISIT(SgAsmLENameTable)
1102 GEN_VISIT(SgAsmLEPageTable)
1103 GEN_VISIT(SgAsmLEPageTableEntry)
1104 GEN_VISIT(SgAsmLERelocTable)
1105 GEN_VISIT(SgAsmLESection)
1106 GEN_VISIT(SgAsmLESectionTable)
1107 GEN_VISIT(SgAsmLESectionTableEntry)
1108 GEN_VISIT(SgAsmM68kInstruction)
1110 GEN_VISIT(SgAsmMipsInstruction)
1111 GEN_VISIT(SgAsmNEEntryPoint)
1112 GEN_VISIT(SgAsmNEEntryTable)
1113 GEN_VISIT(SgAsmNEFileHeader)
1114 GEN_VISIT(SgAsmNEModuleTable)
1115 GEN_VISIT(SgAsmNENameTable)
1116 GEN_VISIT(SgAsmNERelocEntry)
1117 GEN_VISIT(SgAsmNERelocTable)
1118 GEN_VISIT(SgAsmNESection)
1119 GEN_VISIT(SgAsmNESectionTable)
1120 GEN_VISIT(SgAsmNESectionTableEntry)
1121 GEN_VISIT(SgAsmNEStringTable)
1122 GEN_VISIT(SgAsmNode)
1123 GEN_VISIT(SgAsmOp)
1124 GEN_VISIT(SgAsmOperandList)
1125 GEN_VISIT(SgAsmPEExportDirectory)
1126 GEN_VISIT(SgAsmPEExportEntry)
1127 GEN_VISIT(SgAsmPEExportEntryList)
1128 GEN_VISIT(SgAsmPEExportSection)
1129 GEN_VISIT(SgAsmPEFileHeader)
1130 GEN_VISIT(SgAsmPEImportDirectory)
1132 GEN_VISIT(SgAsmPEImportItem)
1133 GEN_VISIT(SgAsmPEImportItemList)
1134 GEN_VISIT(SgAsmPEImportSection)
1135 GEN_VISIT(SgAsmPERVASizePair)
1136 GEN_VISIT(SgAsmPERVASizePairList)
1137 GEN_VISIT(SgAsmPESection)
1138 GEN_VISIT(SgAsmPESectionTable)
1139 GEN_VISIT(SgAsmPESectionTableEntry)
1140 GEN_VISIT(SgAsmPEStringSection)
1141 GEN_VISIT(SgAsmPointerType)
1142 GEN_VISIT(SgAsmPowerpcInstruction)
1143 GEN_VISIT(SgAsmRegisterNames)
1145 GEN_VISIT(SgAsmRiscOperation)
1146 GEN_VISIT(SgAsmScalarType)
1147 GEN_VISIT(SgAsmStatement)
1148 GEN_VISIT(SgAsmStaticData)
1149 GEN_VISIT(SgAsmStmt)
1150 GEN_VISIT(SgAsmStoredString)
1151 GEN_VISIT(SgAsmStringStorage)
1152 GEN_VISIT(SgAsmType)
1153 GEN_VISIT(SgAsmUnaryExpression)
1154 GEN_VISIT(SgAsmUnaryMinus)
1155 GEN_VISIT(SgAsmUnaryPlus)
1156 GEN_VISIT(SgAsmUnaryRrx)
1157 GEN_VISIT(SgAsmUnarySignedExtend)
1158 GEN_VISIT(SgAsmUnaryUnsignedExtend)
1159 GEN_VISIT(SgAsmUnaryTruncate)
1160 GEN_VISIT(SgAsmValueExpression)
1161 GEN_VISIT(SgAsmVectorType)
1162 GEN_VISIT(SgAsmVoidType)
1163 GEN_VISIT(SgAsmX86Instruction)
1164 GEN_VISIT(SgAsmBinaryAddressSymbol)
1165 GEN_VISIT(SgAsmBinaryDataSymbol)
1166 GEN_VISIT(SgAsmNullInstruction)
1167
1168 GEN_VISIT(SgAsmJvmModuleMainClass)
1169 GEN_VISIT(SgAsmInstructionList)
1170 GEN_VISIT(SgAsmCilNode)
1171 GEN_VISIT(SgAsmCilAssembly)
1172 GEN_VISIT(SgAsmCilAssemblyOS)
1173 GEN_VISIT(SgAsmCilAssemblyProcessor)
1174 GEN_VISIT(SgAsmCilAssemblyRef)
1175 GEN_VISIT(SgAsmCilAssemblyRefOS)
1177 GEN_VISIT(SgAsmCilClassLayout)
1178 GEN_VISIT(SgAsmCilConstant)
1179 GEN_VISIT(SgAsmCilCustomAttribute)
1180 GEN_VISIT(SgAsmCilDeclSecurity)
1181 GEN_VISIT(SgAsmCilEvent)
1182 GEN_VISIT(SgAsmCilEventMap)
1183 GEN_VISIT(SgAsmCilExportedType)
1184 GEN_VISIT(SgAsmCilField)
1185 GEN_VISIT(SgAsmCilFieldLayout)
1186 GEN_VISIT(SgAsmCilFieldMarshal)
1187 GEN_VISIT(SgAsmCilFieldRVA)
1188 GEN_VISIT(SgAsmCilFile)
1189 GEN_VISIT(SgAsmCilGenericParam)
1191 GEN_VISIT(SgAsmCilImplMap)
1192 GEN_VISIT(SgAsmCilInterfaceImpl)
1193 GEN_VISIT(SgAsmCilManifestResource)
1194 GEN_VISIT(SgAsmCilMemberRef)
1195 GEN_VISIT(SgAsmCilMethodDef)
1196 GEN_VISIT(SgAsmCilMethodImpl)
1197 GEN_VISIT(SgAsmCilMethodSemantics)
1198 GEN_VISIT(SgAsmCilMethodSpec)
1199 GEN_VISIT(SgAsmCilModule)
1200 GEN_VISIT(SgAsmCilModuleRef)
1201 GEN_VISIT(SgAsmCilNestedClass)
1202 GEN_VISIT(SgAsmCilParam)
1203 GEN_VISIT(SgAsmCilProperty)
1204 GEN_VISIT(SgAsmCilPropertyMap)
1205 GEN_VISIT(SgAsmCilStandAloneSig)
1206 GEN_VISIT(SgAsmCilTypeDef)
1207 GEN_VISIT(SgAsmCilTypeRef)
1208 GEN_VISIT(SgAsmCilTypeSpec)
1209 GEN_VISIT(SgAdaParameterList)
1210 GEN_VISIT(SgAsmCilMetadata)
1211 GEN_VISIT(SgAsmCilMetadataRoot)
1212 GEN_VISIT(SgAsmCilDataStream)
1213 GEN_VISIT(SgAsmCilMetadataHeap)
1214 GEN_VISIT(SgAsmCilUint8Heap)
1215 GEN_VISIT(SgAsmCilUint32Heap)
1216 GEN_VISIT(SgAsmCliHeader)
1217
1222 GEN_VISIT(SgAsmUserInstruction)
1223 GEN_VISIT(SgAsmJvmMethodParameters)
1225 GEN_VISIT(SgAsmVoidType)
1226 GEN_VISIT(SgAsmPointerType)
1227
1228 // incomplete
1229#endif /* WITH_BINARY_NODES */
1230
1231/*
1232 GEN_VISIT(SgBinaryComposite)
1233 GEN_VISIT(SgComprehensionList)
1234 *
1235 GEN_VISIT(SgDirectedGraph)
1236 GEN_VISIT(SgDirectedGraphEdge)
1237 GEN_VISIT(SgDirectedGraphNode)
1238
1239 GEN_VISIT(SgUnknownMemberFunctionType)
1240*/
1241
1242 RoseVisitor rv;
1243 };
1244
1245#undef GEN_VISIT
1246
1247#if 0
1248 constexpr
1249 auto nullptrHandlerTest(...) -> std::false_type;
1250
1251 template <class RoseVisitor>
1252 constexpr
1253 auto nullptrHandlerTest(RoseVisitor&&) -> decltype(std::declval<RoseVisitor>().handle(nullptr), std::true_type{});
1254
1255 template <class T>
1256 struct NullHandler
1257 {
1258 template <class RoseVisitor>
1259 static RoseVisitor handle(RoseVisitor&& rv)
1260 {
1261 rv.handle(nullptr);
1262 return rv;
1263 }
1264 };
1265
1266 template <>
1267 struct NullHandler<std::false_type>
1268 {
1269 template <class RoseVisitor>
1270 static
1271 RoseVisitor handle(RoseVisitor&& rv)
1272 {
1273 ASSERT_not_null(nullptr);
1274 return rv;
1275 }
1276 };
1277#endif
1278
1279 template <class RoseVisitor>
1280 inline
1281 typename std::remove_const<typename std::remove_reference<RoseVisitor>::type>::type
1282 _dispatch(RoseVisitor&& rv, SgNode* n)
1283 {
1284 using RoseVisitorNoref = typename std::remove_reference<RoseVisitor>::type;
1285 using RoseHandler = typename std::remove_const<RoseVisitorNoref>::type;
1286
1287 ASSERT_not_null(n);
1288 //~ if (n == nullptr)
1289 //~ return NullHandler<decltype(nullptrHandlerTest(std::declval<RoseVisitor>()))>
1290 //~ ::handle(std::forward<RoseVisitor>(rv));
1291
1292 VisitDispatcher<RoseHandler> vis( std::forward<RoseVisitor>(rv),
1293 std::is_lvalue_reference<RoseVisitor>()
1294 );
1295
1296 n->accept(vis);
1297 return std::move(vis).rv;
1298 }
1299
1300
1356#if 0
1367#endif
1368
1369 template <class RoseVisitor>
1370 inline
1371 typename std::remove_const<typename std::remove_reference<RoseVisitor>::type>::type
1372 dispatch(RoseVisitor&& rv, SgNode* n)
1373 {
1374 //~ return std::move(rv);
1375 return _dispatch(std::forward<RoseVisitor>(rv), n);
1376 }
1377
1378 template <class RoseVisitor>
1379 inline
1380 typename std::remove_const<typename std::remove_reference<RoseVisitor>::type>::type
1381 dispatch(RoseVisitor&& rv, const SgNode* n)
1382 {
1383 //~ return std::move(rv);
1384 return _dispatch(std::forward<RoseVisitor>(rv), const_cast<SgNode*>(n));
1385 }
1386
1396 template <class SageNode>
1398 {
1399 void handle(SageNode&) {}
1400 };
1401
1409 template <class AncestorNode, class QualSgNode>
1410 struct AncestorTypeFinder : DefaultHandler<const SgProject>
1411 {
1413 typedef std::pair<AncestorNode*, QualSgNode*> Pair;
1414
1415 Pair res;
1416
1418 : Base(), res(nullptr, nullptr)
1419 {}
1420
1421 // handling of const SgProject is outsourced to DefaultHandler
1422 // thus, AncestorNode = const SgProject does not cause conflicts
1423 using Base::handle;
1424
1425 void handle(QualSgNode& n) { res.second = n.get_parent(); }
1426 void handle(AncestorNode& n) { res.first = &n; }
1427
1428 operator Pair() const { return res; }
1429 };
1430
1433 template <class AncestorNode, class QualSgNode>
1434 AncestorNode* _ancestor(QualSgNode& n)
1435 {
1436 using AncestorFinder = AncestorTypeFinder<AncestorNode, QualSgNode>;
1437
1438 typename AncestorFinder::Pair res(nullptr, n.get_parent());
1439
1440 while (res.second != nullptr)
1441 {
1442 res = (typename AncestorFinder::Pair) sg::dispatch(AncestorFinder(), res.second);
1443 }
1444
1445 return res.first;
1446 }
1447
1459 template <class AncestorNode>
1460 AncestorNode* ancestor(SgNode* n)
1461 {
1462 if (n == nullptr) return nullptr;
1463
1464 return _ancestor<AncestorNode>(*n);
1465 }
1466
1468 template <class AncestorNode>
1469 const AncestorNode* ancestor(const SgNode* n)
1470 {
1471 if (n == nullptr) return nullptr;
1472
1473 return _ancestor<const AncestorNode>(*n);
1474 }
1475
1477 template <class AncestorNode>
1478 AncestorNode& ancestor(SgNode& n)
1479 {
1480 AncestorNode* res = _ancestor<AncestorNode>(n);
1481
1482 ROSE_ASSERT(res);
1483 return *res;
1484 }
1485
1487 template <class AncestorNode>
1488 const AncestorNode& ancestor(const SgNode& n)
1489 {
1490 const AncestorNode* res = _ancestor<const AncestorNode>(n);
1491
1492 ROSE_ASSERT(res);
1493 return *res;
1494 }
1495
1496
1497 namespace
1498 {
1500 template <class SageNode>
1501 struct TypeRecoveryHandler
1502 {
1503 using SageRootNode = typename ConstLike<SageNode, SgNode>::type;
1504
1505 TypeRecoveryHandler(const char* f = 0, size_t ln = 0)
1506 : res(nullptr), loc(f), loc_ln(ln)
1507 {}
1508
1509 TypeRecoveryHandler(TypeRecoveryHandler&&) = default;
1510 TypeRecoveryHandler& operator=(TypeRecoveryHandler&&) = default;
1511
1512 operator SageNode* () && { return res; }
1513
1514 void handle(SageRootNode& n) { unexpected_node(n, loc, loc_ln); }
1515 void handle(SageNode& n) { res = &n; }
1516
1517 private:
1518 SageNode* res;
1519 const char* loc;
1520 size_t loc_ln;
1521
1522 TypeRecoveryHandler() = delete;
1523 TypeRecoveryHandler(const TypeRecoveryHandler&) = delete;
1524 TypeRecoveryHandler& operator=(const TypeRecoveryHandler&) = delete;
1525 };
1526 }
1527
1528
1537 template <class SageNode>
1538 SageNode* assert_sage_type(SgNode* n, const char* f = 0, size_t ln = 0)
1539 {
1540 return sg::dispatch(TypeRecoveryHandler<SageNode>(f, ln), n);
1541 }
1542
1543 template <class SageNode>
1544 const SageNode* assert_sage_type(const SgNode* n, const char* f = 0, size_t ln = 0)
1545 {
1546 return sg::dispatch(TypeRecoveryHandler<const SageNode>(f, ln), n);
1547 }
1548
1549 template <class SageNode>
1550 SageNode& assert_sage_type(SgNode& n, const char* f = 0, size_t ln = 0)
1551 {
1552 return *sg::dispatch(TypeRecoveryHandler<SageNode>(f, ln), &n);
1553 }
1554
1555 template <class SageNode>
1556 const SageNode& assert_sage_type(const SgNode& n, const char* f = 0, size_t ln = 0)
1557 {
1558 return *sg::dispatch(TypeRecoveryHandler<const SageNode>(f, ln), &n);
1559 }
1561
1562 template <class SageNode>
1563 struct TypeRecovery : DispatchHandler<SageNode*>
1564 {
1565 void handle(SgNode&) { /* res = nullptr; */ }
1566 void handle(SageNode& n) { this->res = &n; }
1567 };
1568}
1569
1570
1571namespace
1572{
1573 template <class... SageNodes>
1574 struct SageGenericLastType
1575 {
1576 using type = typename std::tuple_element<sizeof...(SageNodes)-1, std::tuple<SageNodes...>>::type;
1577 };
1578
1579 struct SageGenericEndTag {};
1580 struct SageGenericAnyTag {};
1581
1582 template <int> struct SageGenericSequenceTag { using type = SageGenericAnyTag; };
1583 template <> struct SageGenericSequenceTag<0> { using type = SageGenericEndTag; };
1584
1585 template <class SageNode>
1586 auto sageGenericConfirmPath(const SgNode& n, SageGenericEndTag) -> SageNode*
1587 {
1588 return dynamic_cast<SageNode*>(n.get_parent());
1589 //~ return sg::dispatch(TypeRecovery<SageNode>{}, n.get_parent());
1590 }
1591
1592 template <class SageNode, class... SageNodes>
1593 auto sageGenericConfirmPath(const SgNode& n, SageGenericAnyTag)
1594 -> typename SageGenericLastType<SageNode, SageNodes...>::type*
1595 {
1596 if (SageNode* parent = sageGenericConfirmPath<SageNode>(n, SageGenericEndTag{}))
1597 {
1598 using SequenceTag = typename SageGenericSequenceTag<sizeof...(SageNodes)-1>::type;
1599
1600 return sageGenericConfirmPath<SageNodes...>(*parent, SequenceTag{});
1601 }
1602
1603 return nullptr;
1604 }
1605}
1606
1607namespace sg
1608{
1610 template <class SageNode, class... SageNodes>
1611 auto ancestorPath(const SgNode& n)
1612 -> typename SageGenericLastType<SageNode, SageNodes...>::type*
1613 {
1614 using SequenceTag = typename SageGenericSequenceTag<sizeof...(SageNodes)>::type;
1615
1616 return sageGenericConfirmPath<SageNode, SageNodes...>(n, SequenceTag{});
1617 }
1619
1620
1623 static inline
1624 void swap_parent(SgNode* lhs, SgNode* rhs)
1625 {
1626 SgNode* tmp = lhs->get_parent();
1627
1628 lhs->set_parent(rhs->get_parent());
1629 rhs->set_parent(tmp);
1630 }
1631
1635 static inline
1636 void swap_parent(void*, void*) {}
1637
1645 template <class SageNode, class SageChild>
1646 void swap_child(SageNode& lhs, SageNode& rhs, SageChild* (SageNode::*getter) () const, void (SageNode::*setter) (SageChild*))
1647 {
1648 SageChild* lhs_child = (lhs.*getter)();
1649 SageChild* rhs_child = (rhs.*getter)();
1650 ROSE_ASSERT(lhs_child && rhs_child);
1651
1652 (lhs.*setter)(rhs_child);
1653 (rhs.*setter)(lhs_child);
1654
1655 swap_parent(lhs_child, rhs_child);
1656 }
1657
1660 template <class GVisitor>
1662 {
1663 explicit
1664 DispatchHelper(GVisitor gv)
1665 : gvisitor(std::move(gv))
1666 {}
1667
1668 template <class SageNodePtr>
1669 void operator()(SageNodePtr n)
1670 {
1671 if (n) gvisitor = sg::dispatch(std::move(gvisitor), n);
1672 }
1673
1674 operator GVisitor() && { return std::move(gvisitor); }
1675
1676 GVisitor gvisitor;
1677 };
1678
1679
1680 template <class GVisitor>
1681 static inline
1683 dispatchHelper(GVisitor gv)
1684 {
1685 return DispatchHelper<GVisitor>(std::move(gv));
1686 }
1688
1690 struct DefaultTraversalSuccessors
1691 {
1692 SgNodePtrList operator()(const SgNode& n) const
1693 {
1695 }
1696 };
1697
1702 template <class SageNodeFunctor, class SageNode, class SageNodeChildrenGenerator = DefaultTraversalSuccessors>
1703 static inline
1704 SageNodeFunctor
1705 traverseChildren(SageNodeFunctor fn, SageNode& n, SageNodeChildrenGenerator gen = {})
1706 {
1707 SgNodePtrList const successors = gen(n);
1708
1709 return std::for_each( successors.begin(), successors.end(),
1710 std::move(fn)
1711 );
1712 }
1714
1715 template <class SageDispatchHandler, class SageNode, class SageNodeChildrenGenerator = DefaultTraversalSuccessors>
1716 static inline
1717 SageDispatchHandler
1718 traverseDispatchedChildren(SageDispatchHandler handler, SageNode& n, SageNodeChildrenGenerator gen = {})
1719 {
1720 return traverseChildren(dispatchHelper(std::move(handler)), n, std::move(gen));
1721 }
1722
1723
1724
1727 template <class SageParent, class SageChild>
1728 void linkParentChild(SageParent& parent, SageChild& child, void (SageParent::*setter)(SageChild*))
1729 {
1730 (parent.*setter)(&child);
1731 child.set_parent(&parent);
1732 }
1733
1737 template <class SageNode>
1738 typename SageNode::base_node_type&
1739 asBaseType(SageNode& n) { return n; }
1740
1741 template <class SageNode>
1742 const typename SageNode::base_node_type&
1743 asBaseType(const SageNode& n) { return n; }
1744
1745 template <class SageNode>
1746 typename SageNode::base_node_type*
1747 asBaseType(SageNode* n) { return n; }
1748
1749 template <class SageNode>
1750 const typename SageNode::base_node_type*
1751 asBaseType(const SageNode* n) { return n; }
1753}
1754#endif /* _SAGEGENERIC_H */
1755
1756
1757#if OBSOLETE_CODE
1758
1759
1762 template <class SageNode>
1763 struct TraversalFunction
1764 {
1765 typedef void (*TransformHandlerFn)(SageNode*);
1766
1767 explicit
1768 TraversalFunction(TransformHandlerFn fun)
1769 : fn(fun)
1770 {}
1771
1772 void handle(SgNode&) { /* ignore */ }
1773 void handle(SageNode& n) { fn(&n); }
1774
1775 TransformHandlerFn fn;
1776 };
1777
1780 template <class SageNode>
1781 static inline
1782 TraversalFunction<SageNode>
1783 createTraversalFunction(void (* fn)(SageNode*))
1784 {
1785 return TraversalFunction<SageNode>(fn);
1786 }
1787
1788 //
1789 // function type extractor
1790 // see https://stackoverflow.com/questions/28033251/can-you-extract-types-from-template-parameter-function-signature
1791
1792
1793 template <class GVisitor>
1794 struct TraversalClass : AstSimpleProcessing
1795 {
1796 explicit
1797 TraversalClass(GVisitor gv)
1798 : gvisitor(gv)
1799 //~ : gvisitor(std::move(gv))
1800 {}
1801
1802 void visit(SgNode* n)
1803 {
1804 gvisitor = sg::dispatch(gvisitor, n);
1805 }
1806
1807 // GVisitor visitor() && { return std::move(gvisitor); }
1808 GVisitor visitor() { return gvisitor; }
1809
1810 GVisitor gvisitor;
1811 };
1812
1813
1814
1821 template <class F>
1822 static inline
1823 F
1824 forAllNodes(F fn, SgNode* root, AstSimpleProcessing::Order order = postorder)
1825 {
1826 ROSE_ASSERT(root);
1827
1828 TraversalClass<F> tt(fn);
1829 //~ TraversalClass<F> tt(std::move(fn));
1830
1831 tt.traverse(root, order);
1832 return tt.visitor();
1833 }
1834
1835 template <class SageNode>
1836 static inline
1837 void
1838 forAllNodes(void (*fn)(SageNode*), SgNode* root, AstSimpleProcessing::Order order = postorder)
1839 {
1840 forAllNodes(createTraversalFunction(fn), root, order);
1841 }
1842
1843#if !defined(NDEBUG)
1844 static inline
1845 std::string nodeType(const SgNode& n)
1846 {
1847 return typeid(n).name();
1848 }
1849
1850 static inline
1851 std::string nodeType(const SgNode* n)
1852 {
1853 if (n == nullptr) return "<null>";
1854
1855 return nodeType(*n);
1856 }
1857#endif /* !NDEBUG */
1858
1860 template <class SageNode>
1861 auto ancestor_path(const SgNode& n) -> SageNode*
1862 {
1863 return sg::dispatch(TypeRecovery<SageNode>{}, n.get_parent());
1864 }
1865
1867 template <class SageNode, class... SageNodes>
1868 auto ancestor_path(const SgNode& n) -> decltype(ancestor_path<SageNodes...>(n))
1869 {
1870 if (SageNode* parent = ancestor_path<SageNode>(n))
1871 return ancestor_path<SageNodes...>(*parent);
1872
1873 return nullptr;
1874 }
1875
1876#endif /* OBSOLETE_CODE */
Class for traversing the AST.
virtual void visit(SgNode *astNode)=0
this method is called at every traversed node.
String associated with a binary file.
Expression that adds two operands.
Expression that performs an arithmetic, sign-bit preserving right shift.
Expression that divides the first operand by the second.
Base class for binary expressions.
Expression that performs a logical left shift operation.
Expression that performs a logical, sign-bit non-preserving right shift.
Expression that returns the remainder when dividing the first operand by the second.
Expression that performs a logical left shift operation filling low-order bits with one.
Expression that multiplies two operands.
Expression that performs a right rotate.
Expression that subtracts the second operand from the first.
Instruction basic block.
CIL AssemblyOS node (II.22.3).
CIL AssemblyProcessor node (II.22.4).
CIL AssemblyRefOS node (II.22.6).
CIL AssemblyRefProcessor node (II.22.7).
CIL AssemblyRef node (II.22.5).
CIL Assembly node (II.22.2).
CIL ClassLayout node (II.22.8).
CIL Constant node (II.22.9).
CIL CustomAttribute node (II.22.10).
Base class for CIL branch of binary analysis IR nodes.
CIL DeclSecurity node (II.22.11).
CIL EventMap node (II.22.12).
CIL Event node (II.22.13).
CIL ExportedType node (II.22.14).
CIL FieldLayout node (II.22.16).
CIL FieldMarshal node (II.22.17).
CIL FieldRVA node (II.22.18).
CIL Field node (II.22.15).
CIL File node (II.22.19).
CIL GenericParamConstraint node (II.22.21).
CIL GenericParam node (II.22.20).
CIL ImplMap node (II.22.22).
CIL InterfaceImpl node (II.22.23).
CIL ManifestResource node (II.22.24).
CIL MemberRef node (II.22.25).
CIL SgAsmCilMetadataHeap node.
CIL SgAsmCilMetadataRoot.
Base class for CIL branch of binary analysis IR nodes.
CIL MethodDef node (II.22.26).
CIL MethodImpl node (II.22.27).
CIL MethodSemantics node (II.22.28).
CIL MethodSpec node (II.22.29).
CIL ModuleRef node (II.22.31).
CIL Module node (II.22.30).
CIL NestedClass node (II.22.32).
Base class for CIL branch of binary analysis IR nodes.
CIL Param node (II.22.33).
CIL PropertyMap node (II.22.35).
CIL Property node (II.22.34).
CIL StandAloneSig node (II.22.36).
CIL TypeDef node (II.22.37).
CIL TypeRef node (II.22.38).
CIL TypeSpec node (II.22.39).
Base class for CIL branch of binary analysis IR nodes.
Base class for CIL branch of binary analysis IR nodes.
CIL Managed Code section.
COFF symbol string table.
List of COFF symbols.
Base class for constants.
Represents the file header for DOS executables.
Expression representing a machine register.
List of dynamic linking section entries.
One entry from the dynamic linking table.
ELF section containing dynamic linking information.
List of ELF EH frame CI entries.
ELF error handling frame entry, common information entry.
List of ELF error handling frame descriptor entries.
ELF error handling frame entry frame description entry.
Represents an ELF EH frame section.
Represents the file header of an ELF binary container.
Node to hold list of ELF note entries.
One entry of an ELF notes table.
List of ELF relocation entries.
One entry of an ELF relocation table.
Represents an ELF relocation section.
Represents one entry in an ELF section table.
Represents an ELF section table.
Base class for ELF file sections.
Represents one entry of a segment table.
Represents an ELF segment table.
ELF string table section.
ELF string table.
ELF file section containing symbols.
Represents a single ELF symbol.
List of symbol version aux entries.
Auxiliary data for an ELF Symbol Version.
List of entries for the ELF symbol version definition table.
One entry from an ELF symbol version definition table.
The GNU symbol version definitions.
List of entries from a symbol version table.
Entry in an ELF symbol version table.
Hods a list of symbol version aux entries.
Auxiliary info for needed symbol version.
List of symbol version needed entries.
One entry of the ELF symbol version needed table.
GNU symbol version requirements table.
The ELF symbol version table.
Base class for many binary analysis nodes.
List of expression nodes.
Base class for expressions.
Floating point types.
Represents a synthesized function.
List of pointers to other nodes.
Base class for dynamically linked library information.
List of AST file node pointers.
Base class for binary files.
Basic information about an executable container.
List of generic file headers.
Base class for container file headers.
List of pointers to file sections.
Contiguous region of a file.
Base class for strings related to binary specimens.
Base class for string tables.
Node to hold a list of symbol node pointers.
Registers accessed indirectly.
List of SgAsmInstruction nodes.
Base class for machine instructions.
Base class for integer values.
Represents an interpretation of a binary container.
JVM LocalVariableEntry.
JVM LocalVariableTable attribute.
JVM LocalVariableTypeEntry.
JVM LocalVariableTypeTable attribute.
JVM MethodParametersEntry.
JVM MethodParameters attribute.
JVM ModuleMainClass attribute.
Reference to memory locations.
Represents one MIPS machine instruction.
Base class for all binary analysis IR nodes.
List of operands for an instruction.
List of pointers to other AST nodes.
Export file section.
Windows PE file header.
A list of PE Import Directories.
One import directory per library.
A list of imported items.
A single imported object.
Portable Executable Import Section.
List of SgAsmPERVASizePair AST nodes.
Base class for PE sections.
Represents one PowerPC machine instruction.
An ordered list of registers.
Base class for references to a machine register.
Static representation of instruction semantics.
Base class for scalar types.
Base class for statement-like subclasses.
Represents static data in an executable.
This class represents the concept of a C Assembler statement.
Strings stored in an ELF or PE container.
Strings stored in an ELF or PE container.
Declaration-like nodes that encapsulate multiple instructions.
Base class for synthesized declarations.
Base class for binary types.
Base class for unary expressions.
Expression represting negation.
Expression representing a (no-op) unary plus operation.
Expression representing sign extending.
Expression representing truncation.
Expression representing unsigned extending.
Instructions defined at runtime.
Base class for values.
Base class for vector types.
A type that doesn't represent any data.
Represents one Intel x86 machine instruction.
This class represents the rhs of a variable declaration which includes an optional assignment (e....
This class represents the concept of a block (not a basic block from control flow analysis).
This class represents the notion of a binary operator. It is derived from a SgExpression because oper...
This class represents a boolean value (expression value).
This class represents the notion of a break statement (typically used in a switch statment).
This class represents the concept of a generic call expression.
This class represents the concept of a C and C++ case option (used within a switch statement).
This class represents a cast of one type to another.
This class represents the concept of a catch within a try-catch construct used in C++ exception handl...
This class represents the concept of a C++ sequence of catch statements.
This class represents the concept of a class declaration statement. It includes the concept of an ins...
This class represents the concept of a class definition in C++.
This class represents the concept of a C++ expression built from a class name.
This class represents the concept of a class name within the compiler.
This class represents the concept of a C style extern "C" declaration. But such information (linkage)...
This class represents the concept of a C trinary conditional expression (e.g. "test ?...
This class represents the call of a class constructor to initialize a variable. For example "Foo foo;...
This class represents the concept of a C or C++ continue statement.
This class represents the concept of a contructor initializer list (used in constructor (member funct...
This class represents modifiers for SgDeclaration (declaration statements).
This class represents the concept of a declaration statement.
This class represents the concept of a C or C++ default case within a switch statement.
This class represents the concept of a C++ call to the delete operator.
This class represents a directory within a projects file structure of files and directories.
This class represents the concept of a do-while statement.
This class represents the notion of an value (expression value).
This class represents the concept of an enum declaration.
This class represents the concept of the dynamic execution of a string, file, or code object....
This class represents the concept of a C and C++ expression list.
This class represents the concept of a C or C++ statement which contains a expression.
This class represents the notion of an expression. Expressions are derived from SgLocatedNodes,...
This class represents a source file for a project (which may contian many source files and or directo...
This class represents the notion of an value (expression value).
This class represents the variable declaration or variable initialization withn a for loop.
This class represents the concept of a for loop.
This class represents the concept of a C++ function call (which is an expression).
This class represents the concept of a function declaration statement.
This class represents the concept of a scope in C++ (e.g. global scope, fuction scope,...
This class represents the concept of a declaration list.
This class represents the function being called and must be assembled in the SgFunctionCall with the ...
This class represents the concept of a name and a type. It may be renamed in the future to SgTypeSymb...
This class represents the function type table (stores all function types so that they can be shared i...
This class represents a type for all functions.
This class represents the concept of a namespace definition.
This class represents the concept of a C or C++ goto statement.
This class represents the concept of an "if" construct.
This class represents the notion of a declared variable.
This class represents the notion of an initializer for a variable declaration or expression in a func...
This class represents the physical disequality (often called pointer disequality) operator for langua...
This class represents the physical equality (often called pointer equality) operator for languages th...
This class represents the concept of a C or C++ label statement.
This class represents a lambda expression.
This class represents a list display.
This class represents the notion of an expression or statement which has a position within the source...
This class represents the notion of an value (expression value).
This class represents the concept of a member function declaration statement.
This class represents the member function being called and must be assembled in the SgFunctionCall wi...
This class represents the numeric negation of a value. Not to be confused with SgSubtractOp.
This class is not used in ROSE, but is intended to represent a list of SgModifierTypes (similar to th...
This class represents the base class of a number of IR nodes define modifiers within the C++ grammar.
This class represents strings within the IR nodes.
This class represents the concept of a C++ namespace alias declaration statement.
This class represents the concept of a C++ namespace declaration.
This class represents the concept of a namespace definition.
This class represents the concept of a namespace name within the compiler.
This class represents the notion of an n-ary boolean operation. This node is intended for use with Py...
This class represents the notion of an n-ary comparison operation. This node is intended for use with...
This class represents the notion of an n-ary operator. This node is intended for use with Python.
This class represents the concept of a C++ call to the new operator.
This class represents the base class for all IR nodes within Sage III.
SgNode * get_parent() const
Access function for parent node.
virtual std::vector< SgNode * > get_traversalSuccessorContainer() const
container of pointers to AST successor nodes used in the traversal overridden in every class by gener...
void set_parent(SgNode *parent)
All nodes in the AST contain a reference to a parent node.
virtual void accept(ROSE_VisitorPattern &visitor)
support for the classic visitor pattern done in GoF
This class represents an object used to initialize the unparsing.
This class represents a Fortran pointer assignment. It is not some weird compound assignment operator...
This class represents the concept of a C Assembler statement (untested).
This class represents a source project, with a list of SgFile objects and global information about th...
This class represents the concept of a 'global' stmt in Python.
This class represents a OLD concept of the structure require for qualified names when they were in th...
This class represents a OLD concept of the structure require for qualified names when they were in th...
This class represents the "&" operator (applied to any lvalue).
This class represents the concept of a C Assembler statement (untested).
This class was part of CC++ support from a long time ago.
This class represents the concept of a scope in C++ (e.g. global scope, fuction scope,...
This class represents the "sizeof()" operator (applied to any type).
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 GNU extension "statement expression" (thus is non-standard C and C++).
This class represents the notion of a statement.
This class is intended to be a wrapper around SgStatements, allowing them to exist in scopes that onl...
This class represents modifiers specific to storage.
This class represents the conversion of an arbitrary expression to a string. This node is intended fo...
This class represents the base class of a numbr of IR nodes that don't otherwise fit into the existin...
This class represents the concept of a switch.
This class represents the symbol tables used in both SgScopeStatement and the SgFunctionTypeSymbolTab...
This class represents the concept of a name within the compiler.
This class represents template argument within the use of a template to build an instantiation.
This class represents the concept of a template declaration.
This class represents the concept of an instantiated class template.
This class represents the concept of a class definition in C++.
This class represents the concept of a C++ template instantiation directive.
This class represents the concept of an instantiation of function template.
This class represents the concept of an instantiation of member function template or a member functio...
This class represents the "this" operator (can be applied to any member data).
This class represents the C++ throw expression (handled as a unary operator).
This class represents the concept of try statement within the try-catch support for exception handlin...
This class represents a tuple display.
This class represents a C99 complex type.
This class represents a default type used for some IR nodes (see below).
This class represents a C99 complex type.
This class represents a string type used for SgStringVal IR node.
This class represents the base class for all types.
This class represents the notion of a typedef declaration.
This class represents a list of associated typedefs for the SgType IR nodes which reference this list...
This class represents the notion of a unary operator. It is derived from a SgExpression because opera...
This class represents the concept of a C++ using declaration.
This class represents the concept of a C++ using directive.
This class represents the notion of an value (expression value).
This class represents the variable refernece in expressions.
This class represents the concept of a C or C++ variable declaration.
This class represents the definition (initialization) of a variable.
This class represents the concept of a variable name within the compiler (a shared container for the ...
This class represents the concept of a do-while statement.
This class represents the location of the code associated with the IR node in the original source cod...
This namespace contains template functions that operate on the ROSE AST.
Definition sageGeneric.h:38
AncestorNode * _ancestor(QualSgNode &n)
implements the ancestor search
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
std::remove_const< typenamestd::remove_reference< RoseVisitor >::type >::type dispatch(RoseVisitor &&rv, SgNode *n)
uncovers the type of SgNode and passes it to an function "handle" in RoseVisitor.
SageNode * assert_sage_type(SgNode *n, const char *f=0, size_t ln=0)
asserts that n has type SageNode
T & deref(T *ptr, const char *file=0, size_t ln=0)
dereferences an object (= checked dereference in debug mode)
Definition sageGeneric.h:99
AncestorNode * ancestor(SgNode *n)
finds an ancestor node with a given type
auto ancestorPath(const SgNode &n) -> typename SageGenericLastType< SageNode, SageNodes... >::type *
returns the last parent in an ancestor path
void linkParentChild(SageParent &parent, SageChild &child, void(SageParent::*setter)(SageChild *))
Links parent node parent to child node child using the setter method setter.
SageNode::base_node_type & asBaseType(SageNode &n)
returns the same node n upcasted to its base type
helper class for _ancestor
projects the constness of T1 on T2
Definition sageGeneric.h:51
struct DefaultHandler
struct DispatchHandler
prevents the dispatch handler being called on nullptr.
experimental class for returning non-null pointers
NotNull(NotNull< U > nn)
converting ctor for derived types and non-const versions of T
T * operator->() const
arrow operator returns pointer to object
T * pointer() const
explicit conversion operator
NotNull(T *p)
standard constructor testing that p is not nullptr
T & operator*() const
dereference operator returns reference to object