24 #include "llvm/ADT/FoldingSet.h"
25 using namespace clang;
30 llvm::FoldingSetNodeID &
ID;
32 bool ProfileLambdaExpr;
35 StmtProfiler(llvm::FoldingSetNodeID &
ID,
bool Canonical,
36 bool ProfileLambdaExpr)
37 :
ID(
ID), Canonical(Canonical), ProfileLambdaExpr(ProfileLambdaExpr) {}
39 virtual ~StmtProfiler() {}
41 void VisitStmt(
const Stmt *S);
43 void VisitStmtNoChildren(
const Stmt *S) {
44 HandleStmtClass(S->getStmtClass());
49 #define STMT(Node, Base) void Visit##Node(const Node *S);
50 #include "clang/AST/StmtNodes.inc"
54 virtual void VisitDecl(
const Decl *D) = 0;
61 virtual void VisitName(
DeclarationName Name,
bool TreatAsDecl =
false) = 0;
83 class StmtProfilerWithPointers :
public StmtProfiler {
87 StmtProfilerWithPointers(llvm::FoldingSetNodeID &
ID,
89 bool ProfileLambdaExpr)
90 : StmtProfiler(
ID, Canonical, ProfileLambdaExpr), Context(Context) {}
97 void VisitDecl(
const Decl *D)
override {
100 if (Canonical && D) {
102 dyn_cast<NonTypeTemplateParmDecl>(D)) {
103 ID.AddInteger(NTTP->getDepth());
104 ID.AddInteger(NTTP->getIndex());
105 ID.AddBoolean(NTTP->isParameterPack());
118 if (
const ParmVarDecl *Parm = dyn_cast<ParmVarDecl>(D)) {
129 VisitType(Parm->getType());
130 ID.AddInteger(Parm->getFunctionScopeDepth());
131 ID.AddInteger(Parm->getFunctionScopeIndex());
136 dyn_cast<TemplateTypeParmDecl>(D)) {
137 ID.AddInteger(TTP->getDepth());
138 ID.AddInteger(TTP->getIndex());
139 ID.AddBoolean(TTP->isParameterPack());
144 dyn_cast<TemplateTemplateParmDecl>(D)) {
145 ID.AddInteger(TTP->getDepth());
146 ID.AddInteger(TTP->getIndex());
147 ID.AddBoolean(TTP->isParameterPack());
156 if (Canonical && !
T.isNull())
159 ID.AddPointer(
T.getAsOpaquePtr());
163 ID.AddPointer(Name.getAsOpaquePtr());
184 class StmtProfilerWithoutPointers :
public StmtProfiler {
187 StmtProfilerWithoutPointers(llvm::FoldingSetNodeID &
ID,
ODRHash &Hash)
193 if (SC == Stmt::UnresolvedLookupExprClass) {
196 ID.AddInteger(Stmt::DeclRefExprClass);
220 void VisitDecl(
const Decl *D)
override {
238 void StmtProfiler::VisitStmt(
const Stmt *S) {
239 assert(S &&
"Requires non-null Stmt pointer");
241 VisitStmtNoChildren(S);
243 for (
const Stmt *SubStmt : S->children()) {
251 void StmtProfiler::VisitDeclStmt(
const DeclStmt *S) {
253 for (
const auto *D : S->decls())
257 void StmtProfiler::VisitNullStmt(
const NullStmt *S) {
261 void StmtProfiler::VisitCompoundStmt(
const CompoundStmt *S) {
265 void StmtProfiler::VisitCaseStmt(
const CaseStmt *S) {
269 void StmtProfiler::VisitDefaultStmt(
const DefaultStmt *S) {
273 void StmtProfiler::VisitLabelStmt(
const LabelStmt *S) {
275 VisitDecl(S->getDecl());
283 void StmtProfiler::VisitIfStmt(
const IfStmt *S) {
285 VisitDecl(S->getConditionVariable());
288 void StmtProfiler::VisitSwitchStmt(
const SwitchStmt *S) {
290 VisitDecl(S->getConditionVariable());
293 void StmtProfiler::VisitWhileStmt(
const WhileStmt *S) {
295 VisitDecl(S->getConditionVariable());
298 void StmtProfiler::VisitDoStmt(
const DoStmt *S) {
302 void StmtProfiler::VisitForStmt(
const ForStmt *S) {
306 void StmtProfiler::VisitGotoStmt(
const GotoStmt *S) {
308 VisitDecl(S->getLabel());
315 void StmtProfiler::VisitContinueStmt(
const ContinueStmt *S) {
319 void StmtProfiler::VisitBreakStmt(
const BreakStmt *S) {
323 void StmtProfiler::VisitReturnStmt(
const ReturnStmt *S) {
327 void StmtProfiler::VisitGCCAsmStmt(
const GCCAsmStmt *S) {
329 ID.AddBoolean(S->isVolatile());
330 ID.AddBoolean(S->isSimple());
331 VisitStringLiteral(S->getAsmString());
332 ID.AddInteger(S->getNumOutputs());
333 for (
unsigned I = 0, N = S->getNumOutputs(); I != N; ++I) {
334 ID.AddString(S->getOutputName(I));
335 VisitStringLiteral(S->getOutputConstraintLiteral(I));
337 ID.AddInteger(S->getNumInputs());
338 for (
unsigned I = 0, N = S->getNumInputs(); I != N; ++I) {
339 ID.AddString(S->getInputName(I));
340 VisitStringLiteral(S->getInputConstraintLiteral(I));
342 ID.AddInteger(S->getNumClobbers());
343 for (
unsigned I = 0, N = S->getNumClobbers(); I != N; ++I)
344 VisitStringLiteral(S->getClobberStringLiteral(I));
345 ID.AddInteger(S->getNumLabels());
346 for (
auto *L : S->labels())
347 VisitDecl(L->getLabel());
350 void StmtProfiler::VisitMSAsmStmt(
const MSAsmStmt *S) {
355 void StmtProfiler::VisitCXXCatchStmt(
const CXXCatchStmt *S) {
357 VisitType(S->getCaughtType());
360 void StmtProfiler::VisitCXXTryStmt(
const CXXTryStmt *S) {
370 ID.AddBoolean(S->isIfExists());
371 VisitNestedNameSpecifier(S->getQualifierLoc().getNestedNameSpecifier());
372 VisitName(S->getNameInfo().getName());
375 void StmtProfiler::VisitSEHTryStmt(
const SEHTryStmt *S) {
383 void StmtProfiler::VisitSEHExceptStmt(
const SEHExceptStmt *S) {
387 void StmtProfiler::VisitSEHLeaveStmt(
const SEHLeaveStmt *S) {
391 void StmtProfiler::VisitCapturedStmt(
const CapturedStmt *S) {
401 ID.AddBoolean(S->hasEllipsis());
402 if (S->getCatchParamDecl())
403 VisitType(S->getCatchParamDecl()->getType());
410 void StmtProfiler::VisitObjCAtTryStmt(
const ObjCAtTryStmt *S) {
430 StmtProfiler *Profiler;
432 template <
typename T>
433 void VisitOMPClauseList(
T *
Node);
436 OMPClauseProfiler(StmtProfiler *
P) : Profiler(
P) { }
437 #define GEN_CLANG_CLAUSE_CLASS
438 #define CLAUSE_CLASS(Enum, Str, Class) void Visit##Class(const Class *C);
439 #include "llvm/Frontend/OpenMP/OMP.inc"
444 void OMPClauseProfiler::VistOMPClauseWithPreInit(
446 if (
auto *S =
C->getPreInitStmt())
447 Profiler->VisitStmt(S);
450 void OMPClauseProfiler::VistOMPClauseWithPostUpdate(
452 VistOMPClauseWithPreInit(C);
453 if (
auto *E =
C->getPostUpdateExpr())
454 Profiler->VisitStmt(E);
457 void OMPClauseProfiler::VisitOMPIfClause(
const OMPIfClause *C) {
458 VistOMPClauseWithPreInit(C);
459 if (
C->getCondition())
460 Profiler->VisitStmt(
C->getCondition());
463 void OMPClauseProfiler::VisitOMPFinalClause(
const OMPFinalClause *C) {
464 VistOMPClauseWithPreInit(C);
465 if (
C->getCondition())
466 Profiler->VisitStmt(
C->getCondition());
470 VistOMPClauseWithPreInit(C);
471 if (
C->getNumThreads())
472 Profiler->VisitStmt(
C->getNumThreads());
475 void OMPClauseProfiler::VisitOMPAlignClause(
const OMPAlignClause *C) {
476 if (
C->getAlignment())
477 Profiler->VisitStmt(
C->getAlignment());
482 Profiler->VisitStmt(
C->getSafelen());
487 Profiler->VisitStmt(
C->getSimdlen());
490 void OMPClauseProfiler::VisitOMPSizesClause(
const OMPSizesClause *C) {
491 for (
auto *E :
C->getSizesRefs())
493 Profiler->VisitExpr(E);
496 void OMPClauseProfiler::VisitOMPFullClause(
const OMPFullClause *C) {}
499 if (
const Expr *Factor =
C->getFactor())
500 Profiler->VisitExpr(Factor);
504 if (
C->getAllocator())
505 Profiler->VisitStmt(
C->getAllocator());
509 if (
C->getNumForLoops())
510 Profiler->VisitStmt(
C->getNumForLoops());
513 void OMPClauseProfiler::VisitOMPDetachClause(
const OMPDetachClause *C) {
514 if (
Expr *Evt =
C->getEventHandler())
515 Profiler->VisitStmt(Evt);
519 VistOMPClauseWithPreInit(C);
520 if (
C->getCondition())
521 Profiler->VisitStmt(
C->getCondition());
525 VistOMPClauseWithPreInit(C);
526 if (
C->getCondition())
527 Profiler->VisitStmt(
C->getCondition());
530 void OMPClauseProfiler::VisitOMPDefaultClause(
const OMPDefaultClause *C) { }
534 void OMPClauseProfiler::VisitOMPUnifiedAddressClause(
537 void OMPClauseProfiler::VisitOMPUnifiedSharedMemoryClause(
540 void OMPClauseProfiler::VisitOMPReverseOffloadClause(
543 void OMPClauseProfiler::VisitOMPDynamicAllocatorsClause(
546 void OMPClauseProfiler::VisitOMPAtomicDefaultMemOrderClause(
549 void OMPClauseProfiler::VisitOMPAtClause(
const OMPAtClause *C) {}
554 if (
C->getMessageString())
555 Profiler->VisitStmt(
C->getMessageString());
559 VistOMPClauseWithPreInit(C);
560 if (
auto *S =
C->getChunkSize())
561 Profiler->VisitStmt(S);
565 if (
auto *Num =
C->getNumForLoops())
566 Profiler->VisitStmt(Num);
569 void OMPClauseProfiler::VisitOMPNowaitClause(
const OMPNowaitClause *) {}
571 void OMPClauseProfiler::VisitOMPUntiedClause(
const OMPUntiedClause *) {}
575 void OMPClauseProfiler::VisitOMPReadClause(
const OMPReadClause *) {}
577 void OMPClauseProfiler::VisitOMPWriteClause(
const OMPWriteClause *) {}
579 void OMPClauseProfiler::VisitOMPUpdateClause(
const OMPUpdateClause *) {}
585 void OMPClauseProfiler::VisitOMPFailClause(
const OMPFailClause *) {}
587 void OMPClauseProfiler::VisitOMPSeqCstClause(
const OMPSeqCstClause *) {}
589 void OMPClauseProfiler::VisitOMPAcqRelClause(
const OMPAcqRelClause *) {}
597 void OMPClauseProfiler::VisitOMPWeakClause(
const OMPWeakClause *) {}
601 void OMPClauseProfiler::VisitOMPSIMDClause(
const OMPSIMDClause *) {}
605 void OMPClauseProfiler::VisitOMPInitClause(
const OMPInitClause *C) {
606 VisitOMPClauseList(C);
609 void OMPClauseProfiler::VisitOMPUseClause(
const OMPUseClause *C) {
610 if (
C->getInteropVar())
611 Profiler->VisitStmt(
C->getInteropVar());
615 if (
C->getInteropVar())
616 Profiler->VisitStmt(
C->getInteropVar());
619 void OMPClauseProfiler::VisitOMPFilterClause(
const OMPFilterClause *C) {
620 VistOMPClauseWithPreInit(C);
621 if (
C->getThreadID())
622 Profiler->VisitStmt(
C->getThreadID());
626 void OMPClauseProfiler::VisitOMPClauseList(
T *
Node) {
627 for (
auto *E :
Node->varlists()) {
629 Profiler->VisitStmt(E);
634 VisitOMPClauseList(C);
635 for (
auto *E :
C->private_copies()) {
637 Profiler->VisitStmt(E);
642 VisitOMPClauseList(C);
643 VistOMPClauseWithPreInit(C);
644 for (
auto *E :
C->private_copies()) {
646 Profiler->VisitStmt(E);
648 for (
auto *E :
C->inits()) {
650 Profiler->VisitStmt(E);
655 VisitOMPClauseList(C);
656 VistOMPClauseWithPostUpdate(C);
657 for (
auto *E :
C->source_exprs()) {
659 Profiler->VisitStmt(E);
661 for (
auto *E :
C->destination_exprs()) {
663 Profiler->VisitStmt(E);
665 for (
auto *E :
C->assignment_ops()) {
667 Profiler->VisitStmt(E);
670 void OMPClauseProfiler::VisitOMPSharedClause(
const OMPSharedClause *C) {
671 VisitOMPClauseList(C);
673 void OMPClauseProfiler::VisitOMPReductionClause(
675 Profiler->VisitNestedNameSpecifier(
676 C->getQualifierLoc().getNestedNameSpecifier());
677 Profiler->VisitName(
C->getNameInfo().getName());
678 VisitOMPClauseList(C);
679 VistOMPClauseWithPostUpdate(C);
680 for (
auto *E :
C->privates()) {
682 Profiler->VisitStmt(E);
684 for (
auto *E :
C->lhs_exprs()) {
686 Profiler->VisitStmt(E);
688 for (
auto *E :
C->rhs_exprs()) {
690 Profiler->VisitStmt(E);
692 for (
auto *E :
C->reduction_ops()) {
694 Profiler->VisitStmt(E);
696 if (
C->getModifier() == clang::OMPC_REDUCTION_inscan) {
697 for (
auto *E :
C->copy_ops()) {
699 Profiler->VisitStmt(E);
701 for (
auto *E :
C->copy_array_temps()) {
703 Profiler->VisitStmt(E);
705 for (
auto *E :
C->copy_array_elems()) {
707 Profiler->VisitStmt(E);
711 void OMPClauseProfiler::VisitOMPTaskReductionClause(
713 Profiler->VisitNestedNameSpecifier(
714 C->getQualifierLoc().getNestedNameSpecifier());
715 Profiler->VisitName(
C->getNameInfo().getName());
716 VisitOMPClauseList(C);
717 VistOMPClauseWithPostUpdate(C);
718 for (
auto *E :
C->privates()) {
720 Profiler->VisitStmt(E);
722 for (
auto *E :
C->lhs_exprs()) {
724 Profiler->VisitStmt(E);
726 for (
auto *E :
C->rhs_exprs()) {
728 Profiler->VisitStmt(E);
730 for (
auto *E :
C->reduction_ops()) {
732 Profiler->VisitStmt(E);
735 void OMPClauseProfiler::VisitOMPInReductionClause(
737 Profiler->VisitNestedNameSpecifier(
738 C->getQualifierLoc().getNestedNameSpecifier());
739 Profiler->VisitName(
C->getNameInfo().getName());
740 VisitOMPClauseList(C);
741 VistOMPClauseWithPostUpdate(C);
742 for (
auto *E :
C->privates()) {
744 Profiler->VisitStmt(E);
746 for (
auto *E :
C->lhs_exprs()) {
748 Profiler->VisitStmt(E);
750 for (
auto *E :
C->rhs_exprs()) {
752 Profiler->VisitStmt(E);
754 for (
auto *E :
C->reduction_ops()) {
756 Profiler->VisitStmt(E);
758 for (
auto *E :
C->taskgroup_descriptors()) {
760 Profiler->VisitStmt(E);
763 void OMPClauseProfiler::VisitOMPLinearClause(
const OMPLinearClause *C) {
764 VisitOMPClauseList(C);
765 VistOMPClauseWithPostUpdate(C);
766 for (
auto *E :
C->privates()) {
768 Profiler->VisitStmt(E);
770 for (
auto *E :
C->inits()) {
772 Profiler->VisitStmt(E);
774 for (
auto *E :
C->updates()) {
776 Profiler->VisitStmt(E);
778 for (
auto *E :
C->finals()) {
780 Profiler->VisitStmt(E);
783 Profiler->VisitStmt(
C->getStep());
784 if (
C->getCalcStep())
785 Profiler->VisitStmt(
C->getCalcStep());
788 VisitOMPClauseList(C);
789 if (
C->getAlignment())
790 Profiler->VisitStmt(
C->getAlignment());
792 void OMPClauseProfiler::VisitOMPCopyinClause(
const OMPCopyinClause *C) {
793 VisitOMPClauseList(C);
794 for (
auto *E :
C->source_exprs()) {
796 Profiler->VisitStmt(E);
798 for (
auto *E :
C->destination_exprs()) {
800 Profiler->VisitStmt(E);
802 for (
auto *E :
C->assignment_ops()) {
804 Profiler->VisitStmt(E);
809 VisitOMPClauseList(C);
810 for (
auto *E :
C->source_exprs()) {
812 Profiler->VisitStmt(E);
814 for (
auto *E :
C->destination_exprs()) {
816 Profiler->VisitStmt(E);
818 for (
auto *E :
C->assignment_ops()) {
820 Profiler->VisitStmt(E);
823 void OMPClauseProfiler::VisitOMPFlushClause(
const OMPFlushClause *C) {
824 VisitOMPClauseList(C);
826 void OMPClauseProfiler::VisitOMPDepobjClause(
const OMPDepobjClause *C) {
827 if (
const Expr *Depobj =
C->getDepobj())
828 Profiler->VisitStmt(Depobj);
830 void OMPClauseProfiler::VisitOMPDependClause(
const OMPDependClause *C) {
831 VisitOMPClauseList(C);
833 void OMPClauseProfiler::VisitOMPDeviceClause(
const OMPDeviceClause *C) {
835 Profiler->VisitStmt(
C->getDevice());
837 void OMPClauseProfiler::VisitOMPMapClause(
const OMPMapClause *C) {
838 VisitOMPClauseList(C);
841 if (
Expr *Allocator =
C->getAllocator())
842 Profiler->VisitStmt(Allocator);
843 VisitOMPClauseList(C);
846 VistOMPClauseWithPreInit(C);
847 if (
C->getNumTeams())
848 Profiler->VisitStmt(
C->getNumTeams());
850 void OMPClauseProfiler::VisitOMPThreadLimitClause(
852 VistOMPClauseWithPreInit(C);
853 if (
C->getThreadLimit())
854 Profiler->VisitStmt(
C->getThreadLimit());
857 VistOMPClauseWithPreInit(C);
858 if (
C->getPriority())
859 Profiler->VisitStmt(
C->getPriority());
862 VistOMPClauseWithPreInit(C);
863 if (
C->getGrainsize())
864 Profiler->VisitStmt(
C->getGrainsize());
867 VistOMPClauseWithPreInit(C);
868 if (
C->getNumTasks())
869 Profiler->VisitStmt(
C->getNumTasks());
871 void OMPClauseProfiler::VisitOMPHintClause(
const OMPHintClause *C) {
873 Profiler->VisitStmt(
C->getHint());
875 void OMPClauseProfiler::VisitOMPToClause(
const OMPToClause *C) {
876 VisitOMPClauseList(C);
878 void OMPClauseProfiler::VisitOMPFromClause(
const OMPFromClause *C) {
879 VisitOMPClauseList(C);
881 void OMPClauseProfiler::VisitOMPUseDevicePtrClause(
883 VisitOMPClauseList(C);
885 void OMPClauseProfiler::VisitOMPUseDeviceAddrClause(
887 VisitOMPClauseList(C);
889 void OMPClauseProfiler::VisitOMPIsDevicePtrClause(
891 VisitOMPClauseList(C);
893 void OMPClauseProfiler::VisitOMPHasDeviceAddrClause(
895 VisitOMPClauseList(C);
897 void OMPClauseProfiler::VisitOMPNontemporalClause(
899 VisitOMPClauseList(C);
900 for (
auto *E :
C->private_refs())
901 Profiler->VisitStmt(E);
904 VisitOMPClauseList(C);
907 VisitOMPClauseList(C);
909 void OMPClauseProfiler::VisitOMPUsesAllocatorsClause(
911 for (
unsigned I = 0, E =
C->getNumberOfAllocators(); I < E; ++I) {
919 if (
const Expr *Modifier =
C->getModifier())
920 Profiler->VisitStmt(Modifier);
921 for (
const Expr *E :
C->varlists())
922 Profiler->VisitStmt(E);
924 void OMPClauseProfiler::VisitOMPOrderClause(
const OMPOrderClause *C) {}
925 void OMPClauseProfiler::VisitOMPBindClause(
const OMPBindClause *C) {}
926 void OMPClauseProfiler::VisitOMPXDynCGroupMemClause(
928 VistOMPClauseWithPreInit(C);
929 if (
Expr *Size =
C->getSize())
930 Profiler->VisitStmt(Size);
933 VisitOMPClauseList(C);
937 void OMPClauseProfiler::VisitOMPXBareClause(
const OMPXBareClause *C) {}
943 OMPClauseProfiler
P(
this);
956 VisitOMPExecutableDirective(S);
960 VisitOMPLoopBasedDirective(S);
964 VisitOMPExecutableDirective(S);
968 VisitOMPExecutableDirective(S);
972 VisitOMPLoopDirective(S);
975 void StmtProfiler::VisitOMPLoopTransformationDirective(
977 VisitOMPLoopBasedDirective(S);
981 VisitOMPLoopTransformationDirective(S);
985 VisitOMPLoopTransformationDirective(S);
989 VisitOMPLoopDirective(S);
993 VisitOMPLoopDirective(S);
997 VisitOMPExecutableDirective(S);
1001 VisitOMPExecutableDirective(S);
1005 VisitOMPExecutableDirective(S);
1009 VisitOMPExecutableDirective(S);
1013 VisitOMPExecutableDirective(S);
1017 VisitOMPExecutableDirective(S);
1018 VisitName(S->getDirectiveName().getName());
1023 VisitOMPLoopDirective(S);
1026 void StmtProfiler::VisitOMPParallelForSimdDirective(
1028 VisitOMPLoopDirective(S);
1031 void StmtProfiler::VisitOMPParallelMasterDirective(
1033 VisitOMPExecutableDirective(S);
1036 void StmtProfiler::VisitOMPParallelMaskedDirective(
1038 VisitOMPExecutableDirective(S);
1041 void StmtProfiler::VisitOMPParallelSectionsDirective(
1043 VisitOMPExecutableDirective(S);
1047 VisitOMPExecutableDirective(S);
1051 VisitOMPExecutableDirective(S);
1055 VisitOMPExecutableDirective(S);
1059 VisitOMPExecutableDirective(S);
1063 VisitOMPExecutableDirective(S);
1066 VisitOMPExecutableDirective(S);
1067 if (
const Expr *E = S->getReductionRef())
1072 VisitOMPExecutableDirective(S);
1076 VisitOMPExecutableDirective(S);
1080 VisitOMPExecutableDirective(S);
1084 VisitOMPExecutableDirective(S);
1088 VisitOMPExecutableDirective(S);
1092 VisitOMPExecutableDirective(S);
1096 VisitOMPExecutableDirective(S);
1099 void StmtProfiler::VisitOMPTargetEnterDataDirective(
1101 VisitOMPExecutableDirective(S);
1104 void StmtProfiler::VisitOMPTargetExitDataDirective(
1106 VisitOMPExecutableDirective(S);
1109 void StmtProfiler::VisitOMPTargetParallelDirective(
1111 VisitOMPExecutableDirective(S);
1114 void StmtProfiler::VisitOMPTargetParallelForDirective(
1116 VisitOMPExecutableDirective(S);
1120 VisitOMPExecutableDirective(S);
1123 void StmtProfiler::VisitOMPCancellationPointDirective(
1125 VisitOMPExecutableDirective(S);
1129 VisitOMPExecutableDirective(S);
1133 VisitOMPLoopDirective(S);
1136 void StmtProfiler::VisitOMPTaskLoopSimdDirective(
1138 VisitOMPLoopDirective(S);
1141 void StmtProfiler::VisitOMPMasterTaskLoopDirective(
1143 VisitOMPLoopDirective(S);
1146 void StmtProfiler::VisitOMPMaskedTaskLoopDirective(
1148 VisitOMPLoopDirective(S);
1151 void StmtProfiler::VisitOMPMasterTaskLoopSimdDirective(
1153 VisitOMPLoopDirective(S);
1156 void StmtProfiler::VisitOMPMaskedTaskLoopSimdDirective(
1158 VisitOMPLoopDirective(S);
1161 void StmtProfiler::VisitOMPParallelMasterTaskLoopDirective(
1163 VisitOMPLoopDirective(S);
1166 void StmtProfiler::VisitOMPParallelMaskedTaskLoopDirective(
1168 VisitOMPLoopDirective(S);
1171 void StmtProfiler::VisitOMPParallelMasterTaskLoopSimdDirective(
1173 VisitOMPLoopDirective(S);
1176 void StmtProfiler::VisitOMPParallelMaskedTaskLoopSimdDirective(
1178 VisitOMPLoopDirective(S);
1181 void StmtProfiler::VisitOMPDistributeDirective(
1183 VisitOMPLoopDirective(S);
1186 void OMPClauseProfiler::VisitOMPDistScheduleClause(
1188 VistOMPClauseWithPreInit(C);
1189 if (
auto *S =
C->getChunkSize())
1190 Profiler->VisitStmt(S);
1195 void StmtProfiler::VisitOMPTargetUpdateDirective(
1197 VisitOMPExecutableDirective(S);
1200 void StmtProfiler::VisitOMPDistributeParallelForDirective(
1202 VisitOMPLoopDirective(S);
1205 void StmtProfiler::VisitOMPDistributeParallelForSimdDirective(
1207 VisitOMPLoopDirective(S);
1210 void StmtProfiler::VisitOMPDistributeSimdDirective(
1212 VisitOMPLoopDirective(S);
1215 void StmtProfiler::VisitOMPTargetParallelForSimdDirective(
1217 VisitOMPLoopDirective(S);
1220 void StmtProfiler::VisitOMPTargetSimdDirective(
1222 VisitOMPLoopDirective(S);
1225 void StmtProfiler::VisitOMPTeamsDistributeDirective(
1227 VisitOMPLoopDirective(S);
1230 void StmtProfiler::VisitOMPTeamsDistributeSimdDirective(
1232 VisitOMPLoopDirective(S);
1235 void StmtProfiler::VisitOMPTeamsDistributeParallelForSimdDirective(
1237 VisitOMPLoopDirective(S);
1240 void StmtProfiler::VisitOMPTeamsDistributeParallelForDirective(
1242 VisitOMPLoopDirective(S);
1245 void StmtProfiler::VisitOMPTargetTeamsDirective(
1247 VisitOMPExecutableDirective(S);
1250 void StmtProfiler::VisitOMPTargetTeamsDistributeDirective(
1252 VisitOMPLoopDirective(S);
1255 void StmtProfiler::VisitOMPTargetTeamsDistributeParallelForDirective(
1257 VisitOMPLoopDirective(S);
1260 void StmtProfiler::VisitOMPTargetTeamsDistributeParallelForSimdDirective(
1262 VisitOMPLoopDirective(S);
1265 void StmtProfiler::VisitOMPTargetTeamsDistributeSimdDirective(
1267 VisitOMPLoopDirective(S);
1271 VisitOMPExecutableDirective(S);
1275 VisitOMPExecutableDirective(S);
1279 VisitOMPExecutableDirective(S);
1282 void StmtProfiler::VisitOMPGenericLoopDirective(
1284 VisitOMPLoopDirective(S);
1287 void StmtProfiler::VisitOMPTeamsGenericLoopDirective(
1289 VisitOMPLoopDirective(S);
1292 void StmtProfiler::VisitOMPTargetTeamsGenericLoopDirective(
1294 VisitOMPLoopDirective(S);
1297 void StmtProfiler::VisitOMPParallelGenericLoopDirective(
1299 VisitOMPLoopDirective(S);
1302 void StmtProfiler::VisitOMPTargetParallelGenericLoopDirective(
1304 VisitOMPLoopDirective(S);
1307 void StmtProfiler::VisitExpr(
const Expr *S) {
1311 void StmtProfiler::VisitConstantExpr(
const ConstantExpr *S) {
1315 void StmtProfiler::VisitDeclRefExpr(
const DeclRefExpr *S) {
1318 VisitNestedNameSpecifier(S->getQualifier());
1319 VisitDecl(S->getDecl());
1321 ID.AddBoolean(S->hasExplicitTemplateArgs());
1322 if (S->hasExplicitTemplateArgs())
1323 VisitTemplateArguments(S->getTemplateArgs(), S->getNumTemplateArgs());
1327 void StmtProfiler::VisitSYCLUniqueStableNameExpr(
1330 VisitType(S->getTypeSourceInfo()->getType());
1333 void StmtProfiler::VisitSYCLUniqueStableIdExpr(
1338 void StmtProfiler::VisitPredefinedExpr(
const PredefinedExpr *S) {
1340 ID.AddInteger(llvm::to_underlying(S->getIdentKind()));
1343 void StmtProfiler::VisitIntegerLiteral(
const IntegerLiteral *S) {
1345 S->getValue().Profile(
ID);
1349 T =
T.getCanonicalType();
1352 BitIntT->Profile(
ID);
1359 S->getValue().Profile(
ID);
1365 ID.AddInteger(llvm::to_underlying(S->getKind()));
1366 ID.AddInteger(S->getValue());
1371 S->getValue().Profile(
ID);
1372 ID.AddBoolean(S->isExact());
1380 void StmtProfiler::VisitStringLiteral(
const StringLiteral *S) {
1382 ID.AddString(S->getBytes());
1383 ID.AddInteger(llvm::to_underlying(S->getKind()));
1386 void StmtProfiler::VisitParenExpr(
const ParenExpr *S) {
1390 void StmtProfiler::VisitParenListExpr(
const ParenListExpr *S) {
1394 void StmtProfiler::VisitUnaryOperator(
const UnaryOperator *S) {
1396 ID.AddInteger(S->getOpcode());
1399 void StmtProfiler::VisitOffsetOfExpr(
const OffsetOfExpr *S) {
1400 VisitType(S->getTypeSourceInfo()->getType());
1401 unsigned n = S->getNumComponents();
1402 for (
unsigned i = 0; i < n; ++i) {
1430 ID.AddInteger(S->getKind());
1431 if (S->isArgumentType())
1432 VisitType(S->getArgumentType());
1453 for (
unsigned I = 0, E = S->numOfIterators(); I < E; ++I)
1454 VisitDecl(S->getIteratorDecl(I));
1457 void StmtProfiler::VisitCallExpr(
const CallExpr *S) {
1461 void StmtProfiler::VisitMemberExpr(
const MemberExpr *S) {
1463 VisitDecl(S->getMemberDecl());
1465 VisitNestedNameSpecifier(S->getQualifier());
1466 ID.AddBoolean(S->isArrow());
1471 ID.AddBoolean(S->isFileScope());
1474 void StmtProfiler::VisitCastExpr(
const CastExpr *S) {
1480 ID.AddInteger(S->getValueKind());
1485 VisitType(S->getTypeAsWritten());
1488 void StmtProfiler::VisitCStyleCastExpr(
const CStyleCastExpr *S) {
1489 VisitExplicitCastExpr(S);
1492 void StmtProfiler::VisitBinaryOperator(
const BinaryOperator *S) {
1494 ID.AddInteger(S->getOpcode());
1499 VisitBinaryOperator(S);
1506 void StmtProfiler::VisitBinaryConditionalOperator(
1511 void StmtProfiler::VisitAddrLabelExpr(
const AddrLabelExpr *S) {
1513 VisitDecl(S->getLabel());
1516 void StmtProfiler::VisitStmtExpr(
const StmtExpr *S) {
1528 void StmtProfiler::VisitChooseExpr(
const ChooseExpr *S) {
1532 void StmtProfiler::VisitGNUNullExpr(
const GNUNullExpr *S) {
1536 void StmtProfiler::VisitVAArgExpr(
const VAArgExpr *S) {
1540 void StmtProfiler::VisitInitListExpr(
const InitListExpr *S) {
1541 if (S->getSyntacticForm()) {
1542 VisitInitListExpr(S->getSyntacticForm());
1551 ID.AddBoolean(S->usesGNUSyntax());
1553 if (D.isFieldDesignator()) {
1555 VisitName(D.getFieldName());
1559 if (D.isArrayDesignator()) {
1562 assert(D.isArrayRangeDesignator());
1565 ID.AddInteger(D.getArrayIndex());
1571 void StmtProfiler::VisitDesignatedInitUpdateExpr(
1573 llvm_unreachable(
"Unexpected DesignatedInitUpdateExpr in syntactic form of "
1585 void StmtProfiler::VisitNoInitExpr(
const NoInitExpr *S) {
1586 llvm_unreachable(
"Unexpected NoInitExpr in syntactic form of initializer");
1595 VisitName(&S->getAccessor());
1598 void StmtProfiler::VisitBlockExpr(
const BlockExpr *S) {
1600 VisitDecl(S->getBlockDecl());
1606 S->associations()) {
1609 ID.AddPointer(
nullptr);
1612 VisitExpr(Assoc.getAssociationExpr());
1619 i = S->semantics_begin(), e = S->semantics_end(); i != e; ++i)
1622 Visit(OVE->getSourceExpr());
1625 void StmtProfiler::VisitAtomicExpr(
const AtomicExpr *S) {
1627 ID.AddInteger(S->getOp());
1630 void StmtProfiler::VisitConceptSpecializationExpr(
1633 VisitDecl(S->getNamedConcept());
1635 VisitTemplateArgument(Arg);
1638 void StmtProfiler::VisitRequiresExpr(
const RequiresExpr *S) {
1640 ID.AddInteger(S->getLocalParameters().size());
1641 for (
ParmVarDecl *LocalParam : S->getLocalParameters())
1642 VisitDecl(LocalParam);
1643 ID.AddInteger(S->getRequirements().size());
1645 if (
auto *TypeReq = dyn_cast<concepts::TypeRequirement>(Req)) {
1647 ID.AddBoolean(TypeReq->isSubstitutionFailure());
1648 if (!TypeReq->isSubstitutionFailure())
1649 VisitType(TypeReq->getType()->getType());
1650 }
else if (
auto *ExprReq = dyn_cast<concepts::ExprRequirement>(Req)) {
1652 ID.AddBoolean(ExprReq->isExprSubstitutionFailure());
1653 if (!ExprReq->isExprSubstitutionFailure())
1654 Visit(ExprReq->getExpr());
1659 ID.AddBoolean(ExprReq->getNoexceptLoc().isValid());
1661 ExprReq->getReturnTypeRequirement();
1673 auto *NestedReq = cast<concepts::NestedRequirement>(Req);
1674 ID.AddBoolean(NestedReq->hasInvalidConstraint());
1675 if (!NestedReq->hasInvalidConstraint())
1676 Visit(NestedReq->getConstraintExpr());
1684 unsigned &NumArgs) {
1685 switch (S->getOperator()) {
1690 case OO_Array_Delete:
1692 case OO_Conditional:
1694 llvm_unreachable(
"Invalid operator call kind");
1699 return Stmt::UnaryOperatorClass;
1703 return Stmt::BinaryOperatorClass;
1708 return Stmt::UnaryOperatorClass;
1712 return Stmt::BinaryOperatorClass;
1717 return Stmt::UnaryOperatorClass;
1721 return Stmt::BinaryOperatorClass;
1725 return Stmt::BinaryOperatorClass;
1729 return Stmt::BinaryOperatorClass;
1733 return Stmt::BinaryOperatorClass;
1737 UnaryOp = UO_AddrOf;
1738 return Stmt::UnaryOperatorClass;
1742 return Stmt::BinaryOperatorClass;
1746 return Stmt::BinaryOperatorClass;
1750 return Stmt::UnaryOperatorClass;
1754 return Stmt::UnaryOperatorClass;
1757 BinaryOp = BO_Assign;
1758 return Stmt::BinaryOperatorClass;
1762 return Stmt::BinaryOperatorClass;
1766 return Stmt::BinaryOperatorClass;
1769 BinaryOp = BO_AddAssign;
1770 return Stmt::CompoundAssignOperatorClass;
1773 BinaryOp = BO_SubAssign;
1774 return Stmt::CompoundAssignOperatorClass;
1777 BinaryOp = BO_MulAssign;
1778 return Stmt::CompoundAssignOperatorClass;
1781 BinaryOp = BO_DivAssign;
1782 return Stmt::CompoundAssignOperatorClass;
1784 case OO_PercentEqual:
1785 BinaryOp = BO_RemAssign;
1786 return Stmt::CompoundAssignOperatorClass;
1789 BinaryOp = BO_XorAssign;
1790 return Stmt::CompoundAssignOperatorClass;
1793 BinaryOp = BO_AndAssign;
1794 return Stmt::CompoundAssignOperatorClass;
1797 BinaryOp = BO_OrAssign;
1798 return Stmt::CompoundAssignOperatorClass;
1802 return Stmt::BinaryOperatorClass;
1804 case OO_GreaterGreater:
1806 return Stmt::BinaryOperatorClass;
1808 case OO_LessLessEqual:
1809 BinaryOp = BO_ShlAssign;
1810 return Stmt::CompoundAssignOperatorClass;
1812 case OO_GreaterGreaterEqual:
1813 BinaryOp = BO_ShrAssign;
1814 return Stmt::CompoundAssignOperatorClass;
1818 return Stmt::BinaryOperatorClass;
1820 case OO_ExclaimEqual:
1822 return Stmt::BinaryOperatorClass;
1826 return Stmt::BinaryOperatorClass;
1828 case OO_GreaterEqual:
1830 return Stmt::BinaryOperatorClass;
1834 return Stmt::BinaryOperatorClass;
1838 return Stmt::BinaryOperatorClass;
1842 return Stmt::BinaryOperatorClass;
1845 UnaryOp = NumArgs == 1 ? UO_PreInc : UO_PostInc;
1847 return Stmt::UnaryOperatorClass;
1850 UnaryOp = NumArgs == 1 ? UO_PreDec : UO_PostDec;
1852 return Stmt::UnaryOperatorClass;
1855 BinaryOp = BO_Comma;
1856 return Stmt::BinaryOperatorClass;
1859 BinaryOp = BO_PtrMemI;
1860 return Stmt::BinaryOperatorClass;
1863 return Stmt::ArraySubscriptExprClass;
1866 return Stmt::CallExprClass;
1869 UnaryOp = UO_Coawait;
1870 return Stmt::UnaryOperatorClass;
1873 llvm_unreachable(
"Invalid overloaded operator expression");
1876 #if defined(_MSC_VER) && !defined(__clang__)
1877 #if _MSC_VER == 1911
1881 #pragma optimize("", off)
1886 if (S->isTypeDependent()) {
1892 if (S->getOperator() == OO_Arrow)
1893 return Visit(S->getArg(0));
1897 unsigned NumArgs = S->getNumArgs();
1901 for (
unsigned I = 0; I != NumArgs; ++I)
1902 Visit(S->getArg(I));
1903 if (SC == Stmt::UnaryOperatorClass)
1904 ID.AddInteger(UnaryOp);
1905 else if (SC == Stmt::BinaryOperatorClass ||
1906 SC == Stmt::CompoundAssignOperatorClass)
1907 ID.AddInteger(BinaryOp);
1909 assert(SC == Stmt::ArraySubscriptExprClass || SC == Stmt::CallExprClass);
1915 ID.AddInteger(S->getOperator());
1918 void StmtProfiler::VisitCXXRewrittenBinaryOperator(
1922 assert(!S->isTypeDependent() &&
1923 "resolved rewritten operator should never be type-dependent");
1924 ID.AddBoolean(S->isReversed());
1925 VisitExpr(S->getSemanticForm());
1928 #if defined(_MSC_VER) && !defined(__clang__)
1929 #if _MSC_VER == 1911
1930 #pragma optimize("", on)
1942 void StmtProfiler::VisitAsTypeExpr(
const AsTypeExpr *S) {
1947 VisitExplicitCastExpr(S);
1951 VisitCXXNamedCastExpr(S);
1955 VisitCXXNamedCastExpr(S);
1960 VisitCXXNamedCastExpr(S);
1964 VisitCXXNamedCastExpr(S);
1969 VisitType(S->getTypeInfoAsWritten()->getType());
1972 void StmtProfiler::VisitSYCLBuiltinNumFieldsExpr(
1977 void StmtProfiler::VisitSYCLBuiltinFieldTypeExpr(
1983 void StmtProfiler::VisitSYCLBuiltinNumBasesExpr(
1988 void StmtProfiler::VisitSYCLBuiltinBaseTypeExpr(
1995 VisitCXXNamedCastExpr(S);
2004 ID.AddBoolean(S->getValue());
2011 void StmtProfiler::VisitCXXStdInitializerListExpr(
2016 void StmtProfiler::VisitCXXTypeidExpr(
const CXXTypeidExpr *S) {
2018 if (S->isTypeOperand())
2019 VisitType(S->getTypeOperandSourceInfo()->getType());
2022 void StmtProfiler::VisitCXXUuidofExpr(
const CXXUuidofExpr *S) {
2024 if (S->isTypeOperand())
2025 VisitType(S->getTypeOperandSourceInfo()->getType());
2030 VisitDecl(S->getPropertyDecl());
2033 void StmtProfiler::VisitMSPropertySubscriptExpr(
2038 void StmtProfiler::VisitCXXThisExpr(
const CXXThisExpr *S) {
2040 ID.AddBoolean(S->isImplicit());
2041 ID.AddBoolean(S->isCapturedByCopyInLambdaWithExplicitObjectParameter());
2044 void StmtProfiler::VisitCXXThrowExpr(
const CXXThrowExpr *S) {
2050 VisitDecl(S->getParam());
2055 VisitDecl(S->getField());
2066 VisitDecl(S->getConstructor());
2067 ID.AddBoolean(S->isElidable());
2070 void StmtProfiler::VisitCXXInheritedCtorInitExpr(
2073 VisitDecl(S->getConstructor());
2077 VisitExplicitCastExpr(S);
2082 VisitCXXConstructExpr(S);
2086 StmtProfiler::VisitLambdaExpr(
const LambdaExpr *S) {
2087 if (!ProfileLambdaExpr) {
2091 VisitStmtNoChildren(S);
2095 VisitDecl(S->getLambdaClass());
2102 ID.AddInteger(
Capture.getCaptureKind());
2103 if (
Capture.capturesVariable())
2104 VisitDecl(
Capture.getCapturedVar());
2113 for (
auto *SubDecl : Lambda->
decls()) {
2115 if (
auto *FTD = dyn_cast<FunctionTemplateDecl>(SubDecl))
2116 Call = FTD->getTemplatedDecl();
2117 else if (
auto *FD = dyn_cast<FunctionDecl>(SubDecl))
2133 void StmtProfiler::VisitCXXDeleteExpr(
const CXXDeleteExpr *S) {
2135 ID.AddBoolean(S->isGlobalDelete());
2136 ID.AddBoolean(S->isArrayForm());
2137 VisitDecl(S->getOperatorDelete());
2140 void StmtProfiler::VisitCXXNewExpr(
const CXXNewExpr *S) {
2142 VisitType(S->getAllocatedType());
2143 VisitDecl(S->getOperatorNew());
2144 VisitDecl(S->getOperatorDelete());
2145 ID.AddBoolean(S->isArray());
2146 ID.AddInteger(S->getNumPlacementArgs());
2147 ID.AddBoolean(S->isGlobalNew());
2148 ID.AddBoolean(S->isParenTypeId());
2149 ID.AddInteger(llvm::to_underlying(S->getInitializationStyle()));
2155 ID.AddBoolean(S->isArrow());
2156 VisitNestedNameSpecifier(S->getQualifier());
2157 ID.AddBoolean(S->getScopeTypeInfo() !=
nullptr);
2158 if (S->getScopeTypeInfo())
2159 VisitType(S->getScopeTypeInfo()->getType());
2160 ID.AddBoolean(S->getDestroyedTypeInfo() !=
nullptr);
2161 if (S->getDestroyedTypeInfo())
2162 VisitType(S->getDestroyedType());
2164 VisitIdentifierInfo(S->getDestroyedTypeIdentifier());
2167 void StmtProfiler::VisitOverloadExpr(
const OverloadExpr *S) {
2169 VisitNestedNameSpecifier(S->getQualifier());
2170 VisitName(S->getName(),
true);
2171 ID.AddBoolean(S->hasExplicitTemplateArgs());
2172 if (S->hasExplicitTemplateArgs())
2173 VisitTemplateArguments(S->getTemplateArgs(), S->getNumTemplateArgs());
2178 VisitOverloadExpr(S);
2181 void StmtProfiler::VisitTypeTraitExpr(
const TypeTraitExpr *S) {
2183 ID.AddInteger(S->getTrait());
2184 ID.AddInteger(S->getNumArgs());
2185 for (
unsigned I = 0, N = S->getNumArgs(); I != N; ++I)
2186 VisitType(S->getArg(I)->getType());
2191 ID.AddInteger(S->getTrait());
2192 VisitType(S->getQueriedType());
2197 ID.AddInteger(S->getTrait());
2198 VisitExpr(S->getQueriedExpression());
2201 void StmtProfiler::VisitDependentScopeDeclRefExpr(
2204 VisitName(S->getDeclName());
2205 VisitNestedNameSpecifier(S->getQualifier());
2206 ID.AddBoolean(S->hasExplicitTemplateArgs());
2207 if (S->hasExplicitTemplateArgs())
2208 VisitTemplateArguments(S->getTemplateArgs(), S->getNumTemplateArgs());
2215 void StmtProfiler::VisitCXXUnresolvedConstructExpr(
2218 VisitType(S->getTypeAsWritten());
2219 ID.AddInteger(S->isListInitialization());
2222 void StmtProfiler::VisitCXXDependentScopeMemberExpr(
2224 ID.AddBoolean(S->isImplicitAccess());
2225 if (!S->isImplicitAccess()) {
2227 ID.AddBoolean(S->isArrow());
2229 VisitNestedNameSpecifier(S->getQualifier());
2230 VisitName(S->getMember());
2231 ID.AddBoolean(S->hasExplicitTemplateArgs());
2232 if (S->hasExplicitTemplateArgs())
2233 VisitTemplateArguments(S->getTemplateArgs(), S->getNumTemplateArgs());
2237 ID.AddBoolean(S->isImplicitAccess());
2238 if (!S->isImplicitAccess()) {
2240 ID.AddBoolean(S->isArrow());
2242 VisitNestedNameSpecifier(S->getQualifier());
2243 VisitName(S->getMemberName());
2244 ID.AddBoolean(S->hasExplicitTemplateArgs());
2245 if (S->hasExplicitTemplateArgs())
2246 VisitTemplateArguments(S->getTemplateArgs(), S->getNumTemplateArgs());
2257 void StmtProfiler::VisitSizeOfPackExpr(
const SizeOfPackExpr *S) {
2259 VisitDecl(S->getPack());
2260 if (S->isPartiallySubstituted()) {
2261 auto Args = S->getPartialArguments();
2262 ID.AddInteger(Args.size());
2263 for (
const auto &TA : Args)
2264 VisitTemplateArgument(TA);
2276 void StmtProfiler::VisitSubstNonTypeTemplateParmPackExpr(
2279 VisitDecl(S->getParameterPack());
2280 VisitTemplateArgument(S->getArgumentPack());
2283 void StmtProfiler::VisitSubstNonTypeTemplateParmExpr(
2291 VisitDecl(S->getParameterPack());
2292 ID.AddInteger(S->getNumExpansions());
2297 void StmtProfiler::VisitMaterializeTemporaryExpr(
2302 void StmtProfiler::VisitCXXFoldExpr(
const CXXFoldExpr *S) {
2304 ID.AddInteger(S->getOperator());
2315 void StmtProfiler::VisitCoreturnStmt(
const CoreturnStmt *S) {
2319 void StmtProfiler::VisitCoawaitExpr(
const CoawaitExpr *S) {
2327 void StmtProfiler::VisitCoyieldExpr(
const CoyieldExpr *S) {
2335 void StmtProfiler::VisitTypoExpr(
const TypoExpr *E) {
2339 void StmtProfiler::VisitSourceLocExpr(
const SourceLocExpr *E) {
2343 void StmtProfiler::VisitRecoveryExpr(
const RecoveryExpr *E) { VisitExpr(E); }
2349 void StmtProfiler::VisitObjCBoxedExpr(
const ObjCBoxedExpr *E) {
2361 void StmtProfiler::VisitObjCEncodeExpr(
const ObjCEncodeExpr *S) {
2363 VisitType(S->getEncodedType());
2368 VisitName(S->getSelector());
2373 VisitDecl(S->getProtocol());
2378 VisitDecl(S->getDecl());
2379 ID.AddBoolean(S->isArrow());
2380 ID.AddBoolean(S->isFreeIvar());
2385 if (S->isImplicitProperty()) {
2386 VisitDecl(S->getImplicitPropertyGetter());
2387 VisitDecl(S->getImplicitPropertySetter());
2389 VisitDecl(S->getExplicitProperty());
2391 if (S->isSuperReceiver()) {
2392 ID.AddBoolean(S->isSuperReceiver());
2393 VisitType(S->getSuperReceiverType());
2399 VisitDecl(S->getAtIndexMethodDecl());
2400 VisitDecl(S->setAtIndexMethodDecl());
2405 VisitName(S->getSelector());
2406 VisitDecl(S->getMethodDecl());
2409 void StmtProfiler::VisitObjCIsaExpr(
const ObjCIsaExpr *S) {
2411 ID.AddBoolean(S->isArrow());
2416 ID.AddBoolean(S->getValue());
2419 void StmtProfiler::VisitObjCIndirectCopyRestoreExpr(
2422 ID.AddBoolean(S->shouldCopy());
2426 VisitExplicitCastExpr(S);
2427 ID.AddBoolean(S->getBridgeKind());
2430 void StmtProfiler::VisitObjCAvailabilityCheckExpr(
2437 ID.AddInteger(NumArgs);
2438 for (
unsigned I = 0; I != NumArgs; ++I)
2485 VisitTemplateArgument(
P);
2491 class OpenACCClauseProfiler
2493 StmtProfiler &Profiler;
2496 OpenACCClauseProfiler(StmtProfiler &
P) : Profiler(
P) {}
2506 #define VISIT_CLAUSE(CLAUSE_NAME) \
2507 void Visit##CLAUSE_NAME##Clause(const OpenACC##CLAUSE_NAME##Clause &Clause);
2509 #include "clang/Basic/OpenACCClauses.def"
2513 void OpenACCClauseProfiler::VisitDefaultClause(
2516 void OpenACCClauseProfiler::VisitIfClause(
const OpenACCIfClause &Clause) {
2518 "if clause requires a valid condition expr");
2524 Profiler.VisitStmt(E);
2526 void OpenACCClauseProfiler::VisitCopyInClause(
2529 Profiler.VisitStmt(E);
2532 void OpenACCClauseProfiler::VisitCopyOutClause(
2535 Profiler.VisitStmt(E);
2538 void OpenACCClauseProfiler::VisitCreateClause(
2541 Profiler.VisitStmt(E);
2549 void OpenACCClauseProfiler::VisitNumGangsClause(
2552 Profiler.VisitStmt(E);
2555 void OpenACCClauseProfiler::VisitNumWorkersClause(
2557 assert(Clause.
hasIntExpr() &&
"num_workers clause requires a valid int expr");
2561 void OpenACCClauseProfiler::VisitPrivateClause(
2564 Profiler.VisitStmt(E);
2567 void OpenACCClauseProfiler::VisitFirstPrivateClause(
2570 Profiler.VisitStmt(E);
2573 void OpenACCClauseProfiler::VisitAttachClause(
2576 Profiler.VisitStmt(E);
2579 void OpenACCClauseProfiler::VisitDevicePtrClause(
2582 Profiler.VisitStmt(E);
2585 void OpenACCClauseProfiler::VisitNoCreateClause(
2588 Profiler.VisitStmt(E);
2591 void OpenACCClauseProfiler::VisitPresentClause(
2594 Profiler.VisitStmt(E);
2597 void OpenACCClauseProfiler::VisitVectorLengthClause(
2600 "vector_length clause requires a valid int expr");
2613 Profiler.VisitStmt(E);
2616 void OpenACCClauseProfiler::VisitDeviceTypeClause(
2619 void OpenACCClauseProfiler::VisitReductionClause(
2622 Profiler.VisitStmt(E);
2626 void StmtProfiler::VisitOpenACCComputeConstruct(
2631 OpenACCClauseProfiler
P{*
this};
2632 P.VisitOpenACCClauseList(S->clauses());
2636 bool Canonical,
bool ProfileLambdaExpr)
const {
2637 StmtProfilerWithPointers Profiler(
ID, Context, Canonical, ProfileLambdaExpr);
2638 Profiler.Visit(
this);
2643 StmtProfilerWithoutPointers Profiler(
ID, Hash);
2644 Profiler.Visit(
this);
Defines the clang::ASTContext interface.
Defines the C++ Decl subclasses, other than those for templates (found in DeclTemplate....
Defines the C++ template declaration subclasses.
Defines the clang::Expr interface and subclasses for C++ expressions.
This file contains the declaration of the ODRHash class, which calculates a hash based on AST nodes,...
This file defines OpenMP AST classes for clauses.
static Stmt::StmtClass DecodeOperatorCall(const CXXOperatorCallExpr *S, UnaryOperatorKind &UnaryOp, BinaryOperatorKind &BinaryOp, unsigned &NumArgs)
static const TemplateArgument & getArgument(const TemplateArgument &A)
void Profile(llvm::FoldingSetNodeID &ID) const
profile this value.
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
TemplateName getCanonicalTemplateName(const TemplateName &Name) const
Retrieves the "canonical" template name that refers to a given template.
CanQualType getCanonicalType(QualType T) const
Return the canonical (structural) type corresponding to the specified potentially non-canonical type ...
QualType getUnconstrainedType(QualType T) const
Remove any type constraints from a template parameter type, for equivalence comparison of template pa...
NestedNameSpecifier * getCanonicalNestedNameSpecifier(NestedNameSpecifier *NNS) const
Retrieves the "canonical" nested name specifier for a given nested name specifier.
AddrLabelExpr - The GNU address of label extension, representing &&label.
Represents the index of the current element of an array being initialized by an ArrayInitLoopExpr.
Represents a loop initializing the elements of an array.
This class represents BOTH the OpenMP Array Section and OpenACC 'subarray', with a boolean differenti...
ArraySubscriptExpr - [C99 6.5.2.1] Array Subscripting.
An Embarcadero array type trait, as used in the implementation of __array_rank and __array_extent.
AsTypeExpr - Clang builtin function __builtin_astype [OpenCL 6.2.4.2] This AST node provides support ...
AtomicExpr - Variadic atomic builtins: __atomic_exchange, __atomic_fetch_*, __atomic_load,...
Represents an attribute applied to a statement.
BinaryConditionalOperator - The GNU extension to the conditional operator which allows the middle ope...
A builtin binary operation expression such as "x + y" or "x <= y".
A fixed int type of a specified bitwidth.
BlockExpr - Adaptor class for mixing a BlockDecl with expressions.
BreakStmt - This represents a break.
Represents a C++2a __builtin_bit_cast(T, v) expression.
This class is used for builtin types like 'int'.
CStyleCastExpr - An explicit cast in C (C99 6.5.4) or a C-style cast in C++ (C++ [expr....
Represents a call to a CUDA kernel function.
A C++ addrspace_cast expression (currently only enabled for OpenCL).
Represents binding an expression to a temporary.
A boolean literal, per ([C++ lex.bool] Boolean literals).
CXXCatchStmt - This represents a C++ catch block.
A C++ const_cast expression (C++ [expr.const.cast]).
Represents a call to a C++ constructor.
A default argument (C++ [dcl.fct.default]).
A use of a default initializer in a constructor or in aggregate initialization.
Represents a delete expression for memory deallocation and destructor calls, e.g.
Represents a C++ member access expression where the actual member referenced could not be resolved be...
Represents a C++ destructor within a class.
A C++ dynamic_cast expression (C++ [expr.dynamic.cast]).
Represents a folding of a pack over an operator.
CXXForRangeStmt - This represents C++0x [stmt.ranged]'s ranged for statement, represented as 'for (ra...
Represents an explicit C++ type conversion that uses "functional" notation (C++ [expr....
Represents a call to an inherited base class constructor from an inheriting constructor.
Represents a call to a member function that may be written either with member call syntax (e....
Abstract class common to all of the C++ "named"/"keyword" casts.
Represents a new-expression for memory allocation and constructor calls, e.g: "new CXXNewExpr(foo)".
Represents a C++11 noexcept expression (C++ [expr.unary.noexcept]).
The null pointer literal (C++11 [lex.nullptr])
A call to an overloaded operator written using operator syntax.
Represents a list-initialization with parenthesis.
Represents a C++ pseudo-destructor (C++ [expr.pseudo]).
Represents a C++ struct/union/class.
capture_const_range captures() const
A C++ reinterpret_cast expression (C++ [expr.reinterpret.cast]).
A rewritten comparison expression that was originally written using operator syntax.
An expression "T()" which creates a value-initialized rvalue of type T, which is a non-class type.
A C++ static_cast expression (C++ [expr.static.cast]).
Implicit construction of a std::initializer_list<T> object from an array temporary within list-initia...
Represents a C++ functional cast expression that builds a temporary object.
Represents the this expression in C++.
A C++ throw-expression (C++ [except.throw]).
CXXTryStmt - A C++ try block, including all handlers.
A C++ typeid expression (C++ [expr.typeid]), which gets the type_info that corresponds to the supplie...
Describes an explicit type conversion that uses functional notion but could not be resolved because o...
A Microsoft C++ __uuidof expression, which gets the _GUID that corresponds to the supplied type or ex...
CallExpr - Represents a function call (C99 6.5.2.2, C++ [expr.call]).
This captures a statement into a function.
CaseStmt - Represent a case statement.
CastExpr - Base class for type casts, including both implicit casts (ImplicitCastExpr) and explicit c...
ChooseExpr - GNU builtin-in function __builtin_choose_expr.
Represents a 'co_await' expression.
CompoundAssignOperator - For compound assignments (e.g.
CompoundLiteralExpr - [C99 6.5.2.5].
CompoundStmt - This represents a group of statements like { stmt stmt }.
Represents the specialization of a concept - evaluates to a prvalue of type bool.
ConditionalOperator - The ?: ternary operator.
ConstStmtVisitor - This class implements a simple visitor for Stmt subclasses.
ConstantExpr - An expression that occurs in a constant context and optionally the result of evaluatin...
ContinueStmt - This represents a continue.
ConvertVectorExpr - Clang builtin function __builtin_convertvector This AST node provides support for...
Represents a 'co_return' statement in the C++ Coroutines TS.
Represents the body of a coroutine.
Represents a 'co_yield' expression.
decl_range decls() const
decls_begin/decls_end - Iterate over the declarations stored in this context.
A reference to a declared variable, function, enum, etc.
DeclStmt - Adaptor class for mixing declarations with statements and expressions.
Decl - This represents one declaration (or definition), e.g.
virtual Decl * getCanonicalDecl()
Retrieves the "canonical" declaration of the given declaration.
The name of a declaration.
Represents a 'co_await' expression while the type of the promise is dependent.
A qualified reference to a name whose declaration cannot yet be resolved.
Represents a single C99 designator.
Represents a C99 designated initializer expression.
DoStmt - This represents a 'do/while' stmt.
ExplicitCastExpr - An explicit cast written in the source code.
Represents an expression – generally a full-expression – that introduces cleanups to be run at the en...
This represents one expression.
An expression trait intrinsic.
ExtVectorElementExpr - This represents access to specific elements of a vector, and may occur on the ...
ForStmt - This represents a 'for (init;cond;inc)' stmt.
Represents a function declaration or definition.
Represents a reference to a function parameter pack or init-capture pack that has been substituted bu...
VarDecl *const * iterator
Iterators over the parameters which the parameter pack expanded into.
This represents a GCC inline-assembly statement extension.
GNUNullExpr - Implements the GNU __null extension, which is a name for a null pointer constant that h...
Represents a C11 generic selection.
AssociationTy< true > ConstAssociation
GotoStmt - This represents a direct goto.
One of these records is kept for each identifier that is lexed.
IfStmt - This represents an if/then/else.
ImaginaryLiteral - We support imaginary integer and floating point literals, like "1....
ImplicitCastExpr - Allows us to explicitly represent implicit type conversions, which have no direct ...
Represents an implicitly-generated value initialization of an object of a given type.
IndirectGotoStmt - This represents an indirect goto.
Describes an C or C++ initializer list.
LabelStmt - Represents a label, which has a substatement.
A C++ lambda expression, which produces a function object (of unspecified type) that can be invoked l...
This represents a Microsoft inline-assembly statement extension.
Representation of a Microsoft __if_exists or __if_not_exists statement with a dependent name.
A member reference to an MSPropertyDecl.
MS property subscript expression.
Represents a prvalue temporary that is written into memory so that a reference can bind to it.
MatrixSubscriptExpr - Matrix subscript expression for the MatrixType extension.
MemberExpr - [C99 6.5.2.3] Structure and Union Members.
Represents a C++ nested name specifier, such as "\::std::vector<int>::".
Represents a place-holder for an object not to be initialized by anything.
NonTypeTemplateParmDecl - Declares a non-type template parameter, e.g., "Size" in.
NullStmt - This is the null statement ";": C99 6.8.3p3.
void AddDecl(const Decl *D)
void AddIdentifierInfo(const IdentifierInfo *II)
void AddDeclarationName(DeclarationName Name, bool TreatAsDecl=false)
void AddNestedNameSpecifier(const NestedNameSpecifier *NNS)
void AddFunctionDecl(const FunctionDecl *Function, bool SkipBody=false)
void AddTemplateName(TemplateName Name)
void AddQualType(QualType T)
This represents 'acq_rel' clause in the '#pragma omp atomic|flush' directives.
This represents 'acquire' clause in the '#pragma omp atomic|flush' directives.
This represents clause 'affinity' in the '#pragma omp task'-based directives.
This represents the 'align' clause in the '#pragma omp allocate' directive.
This represents clause 'aligned' in the '#pragma omp ...' directives.
This represents clause 'allocate' in the '#pragma omp ...' directives.
This represents 'allocator' clause in the '#pragma omp ...' directive.
An explicit cast in C or a C-style cast in C++, which uses the syntax ([s1][s2]......
This represents 'at' clause in the '#pragma omp error' directive.
This represents 'atomic_default_mem_order' clause in the '#pragma omp requires' directive.
This represents '#pragma omp atomic' directive.
This represents '#pragma omp barrier' directive.
This represents 'bind' clause in the '#pragma omp ...' directives.
This represents '#pragma omp cancel' directive.
This represents '#pragma omp cancellation point' directive.
Representation of an OpenMP canonical loop.
This represents 'capture' clause in the '#pragma omp atomic' directive.
Class that handles post-update expression for some clauses, like 'lastprivate', 'reduction' etc.
Class that handles pre-initialization statement for some clauses, like 'shedule', 'firstprivate' etc.
This represents 'collapse' clause in the '#pragma omp ...' directive.
This represents 'compare' clause in the '#pragma omp atomic' directive.
This represents clause 'copyin' in the '#pragma omp ...' directives.
This represents clause 'copyprivate' in the '#pragma omp ...' directives.
This represents '#pragma omp critical' directive.
This represents 'default' clause in the '#pragma omp ...' directive.
This represents 'defaultmap' clause in the '#pragma omp ...' directive.
This represents implicit clause 'depend' for the '#pragma omp task' directive.
This represents implicit clause 'depobj' for the '#pragma omp depobj' directive.
This represents '#pragma omp depobj' directive.
This represents 'destroy' clause in the '#pragma omp depobj' directive or the '#pragma omp interop' d...
This represents 'detach' clause in the '#pragma omp task' directive.
This represents 'device' clause in the '#pragma omp ...' directive.
This represents '#pragma omp dispatch' directive.
This represents 'dist_schedule' clause in the '#pragma omp ...' directive.
This represents '#pragma omp distribute' directive.
This represents '#pragma omp distribute parallel for' composite directive.
This represents '#pragma omp distribute parallel for simd' composite directive.
This represents '#pragma omp distribute simd' composite directive.
This represents the 'doacross' clause for the '#pragma omp ordered' directive.
This represents 'dynamic_allocators' clause in the '#pragma omp requires' directive.
This represents '#pragma omp error' directive.
This represents clause 'exclusive' in the '#pragma omp scan' directive.
This is a basic class for representing single OpenMP executable directive.
This represents 'fail' clause in the '#pragma omp atomic' directive.
This represents 'filter' clause in the '#pragma omp ...' directive.
This represents 'final' clause in the '#pragma omp ...' directive.
This represents clause 'firstprivate' in the '#pragma omp ...' directives.
This represents implicit clause 'flush' for the '#pragma omp flush' directive.
This represents '#pragma omp flush' directive.
This represents '#pragma omp for' directive.
This represents '#pragma omp for simd' directive.
This represents clause 'from' in the '#pragma omp ...' directives.
Representation of the 'full' clause of the '#pragma omp unroll' directive.
This represents '#pragma omp loop' directive.
This represents 'grainsize' clause in the '#pragma omp ...' directive.
This represents clause 'has_device_ptr' in the '#pragma omp ...' directives.
This represents 'hint' clause in the '#pragma omp ...' directive.
This represents 'if' clause in the '#pragma omp ...' directive.
This represents clause 'in_reduction' in the '#pragma omp task' directives.
This represents clause 'inclusive' in the '#pragma omp scan' directive.
This represents the 'init' clause in '#pragma omp ...' directives.
This represents '#pragma omp interop' directive.
This represents clause 'is_device_ptr' in the '#pragma omp ...' directives.
OpenMP 5.0 [2.1.6 Iterators] Iterators are identifiers that expand to multiple values in the clause o...
This represents clause 'lastprivate' in the '#pragma omp ...' directives.
This represents clause 'linear' in the '#pragma omp ...' directives.
The base class for all loop-based directives, including loop transformation directives.
This is a common base class for loop directives ('omp simd', 'omp for', 'omp for simd' etc....
This represents clause 'map' in the '#pragma omp ...' directives.
This represents '#pragma omp masked' directive.
This represents '#pragma omp masked taskloop' directive.
This represents '#pragma omp masked taskloop simd' directive.
This represents '#pragma omp master' directive.
This represents '#pragma omp master taskloop' directive.
This represents '#pragma omp master taskloop simd' directive.
This represents 'mergeable' clause in the '#pragma omp ...' directive.
This represents 'message' clause in the '#pragma omp error' directive.
This represents 'nocontext' clause in the '#pragma omp ...' directive.
This represents 'nogroup' clause in the '#pragma omp ...' directive.
This represents clause 'nontemporal' in the '#pragma omp ...' directives.
This represents 'novariants' clause in the '#pragma omp ...' directive.
This represents 'nowait' clause in the '#pragma omp ...' directive.
This represents 'num_tasks' clause in the '#pragma omp ...' directive.
This represents 'num_teams' clause in the '#pragma omp ...' directive.
This represents 'num_threads' clause in the '#pragma omp ...' directive.
This represents 'order' clause in the '#pragma omp ...' directive.
This represents 'ordered' clause in the '#pragma omp ...' directive.
This represents '#pragma omp ordered' directive.
This represents '#pragma omp parallel' directive.
This represents '#pragma omp parallel for' directive.
This represents '#pragma omp parallel for simd' directive.
This represents '#pragma omp parallel loop' directive.
This represents '#pragma omp parallel masked' directive.
This represents '#pragma omp parallel masked taskloop' directive.
This represents '#pragma omp parallel masked taskloop simd' directive.
This represents '#pragma omp parallel master' directive.
This represents '#pragma omp parallel master taskloop' directive.
This represents '#pragma omp parallel master taskloop simd' directive.
This represents '#pragma omp parallel sections' directive.
Representation of the 'partial' clause of the '#pragma omp unroll' directive.
This represents 'priority' clause in the '#pragma omp ...' directive.
This represents clause 'private' in the '#pragma omp ...' directives.
This represents 'proc_bind' clause in the '#pragma omp ...' directive.
This represents 'read' clause in the '#pragma omp atomic' directive.
This represents clause 'reduction' in the '#pragma omp ...' directives.
This represents 'relaxed' clause in the '#pragma omp atomic' directives.
This represents 'release' clause in the '#pragma omp atomic|flush' directives.
This represents 'reverse_offload' clause in the '#pragma omp requires' directive.
This represents 'simd' clause in the '#pragma omp ...' directive.
This represents 'safelen' clause in the '#pragma omp ...' directive.
This represents '#pragma omp scan' directive.
This represents 'schedule' clause in the '#pragma omp ...' directive.
This represents '#pragma omp scope' directive.
This represents '#pragma omp section' directive.
This represents '#pragma omp sections' directive.
This represents 'seq_cst' clause in the '#pragma omp atomic' directive.
This represents 'severity' clause in the '#pragma omp error' directive.
This represents clause 'shared' in the '#pragma omp ...' directives.
This represents '#pragma omp simd' directive.
This represents 'simdlen' clause in the '#pragma omp ...' directive.
This represents '#pragma omp single' directive.
This represents the 'sizes' clause in the '#pragma omp tile' directive.
This represents '#pragma omp target data' directive.
This represents '#pragma omp target' directive.
This represents '#pragma omp target enter data' directive.
This represents '#pragma omp target exit data' directive.
This represents '#pragma omp target parallel' directive.
This represents '#pragma omp target parallel for' directive.
This represents '#pragma omp target parallel for simd' directive.
This represents '#pragma omp target parallel loop' directive.
This represents '#pragma omp target simd' directive.
This represents '#pragma omp target teams' directive.
This represents '#pragma omp target teams distribute' combined directive.
This represents '#pragma omp target teams distribute parallel for' combined directive.
This represents '#pragma omp target teams distribute parallel for simd' combined directive.
This represents '#pragma omp target teams distribute simd' combined directive.
This represents '#pragma omp target teams loop' directive.
This represents '#pragma omp target update' directive.
This represents '#pragma omp task' directive.
This represents '#pragma omp taskloop' directive.
This represents '#pragma omp taskloop simd' directive.
This represents clause 'task_reduction' in the '#pragma omp taskgroup' directives.
This represents '#pragma omp taskgroup' directive.
This represents '#pragma omp taskwait' directive.
This represents '#pragma omp taskyield' directive.
This represents '#pragma omp teams' directive.
This represents '#pragma omp teams distribute' directive.
This represents '#pragma omp teams distribute parallel for' composite directive.
This represents '#pragma omp teams distribute parallel for simd' composite directive.
This represents '#pragma omp teams distribute simd' combined directive.
This represents '#pragma omp teams loop' directive.
This represents 'thread_limit' clause in the '#pragma omp ...' directive.
This represents 'threads' clause in the '#pragma omp ...' directive.
This represents the '#pragma omp tile' loop transformation directive.
This represents clause 'to' in the '#pragma omp ...' directives.
This represents 'unified_address' clause in the '#pragma omp requires' directive.
This represents 'unified_shared_memory' clause in the '#pragma omp requires' directive.
This represents the '#pragma omp unroll' loop transformation directive.
This represents 'untied' clause in the '#pragma omp ...' directive.
This represents 'update' clause in the '#pragma omp atomic' directive.
This represents the 'use' clause in '#pragma omp ...' directives.
This represents clause 'use_device_addr' in the '#pragma omp ...' directives.
This represents clause 'use_device_ptr' in the '#pragma omp ...' directives.
This represents clause 'uses_allocators' in the '#pragma omp target'-based directives.
This represents 'weak' clause in the '#pragma omp atomic' directives.
This represents 'write' clause in the '#pragma omp atomic' directive.
This represents 'ompx_attribute' clause in a directive that might generate an outlined function.
This represents 'ompx_bare' clause in the '#pragma omp target teams ...' directive.
This represents 'ompx_dyn_cgroup_mem' clause in the '#pragma omp target ...' directive.
ObjCArrayLiteral - used for objective-c array containers; as in: @["Hello", NSApp,...
Represents Objective-C's @catch statement.
Represents Objective-C's @finally statement.
Represents Objective-C's @synchronized statement.
Represents Objective-C's @throw statement.
Represents Objective-C's @try ... @catch ... @finally statement.
Represents Objective-C's @autoreleasepool Statement.
A runtime availability query.
ObjCBoolLiteralExpr - Objective-C Boolean Literal.
ObjCBoxedExpr - used for generalized expression boxing.
An Objective-C "bridged" cast expression, which casts between Objective-C pointers and C pointers,...
ObjCDictionaryLiteral - AST node to represent objective-c dictionary literals; as in:"name" : NSUserN...
ObjCEncodeExpr, used for @encode in Objective-C.
Represents Objective-C's collection statement.
ObjCIndirectCopyRestoreExpr - Represents the passing of a function argument by indirect copy-restore ...
ObjCIsaExpr - Represent X->isa and X.isa when X is an ObjC 'id' type.
ObjCIvarRefExpr - A reference to an ObjC instance variable.
An expression that sends a message to the given Objective-C object or class.
ObjCPropertyRefExpr - A dot-syntax expression to access an ObjC property.
ObjCProtocolExpr used for protocol expression in Objective-C.
ObjCSelectorExpr used for @selector in Objective-C.
ObjCStringLiteral, used for Objective-C string literals i.e.
ObjCSubscriptRefExpr - used for array and dictionary subscripting.
OffsetOfExpr - [C99 7.17] - This represents an expression of the form offsetof(record-type,...
Helper class for OffsetOfExpr.
IdentifierInfo * getFieldName() const
For a field or identifier offsetof node, returns the name of the field.
FieldDecl * getField() const
For a field offsetof node, returns the field.
@ Array
An index into an array.
@ Identifier
A field in a dependent type, known only by its name.
@ Base
An implicit indirection through a C++ base class, when the field found is in a base class.
Kind getKind() const
Determine what kind of offsetof node this is.
OpaqueValueExpr - An expression referring to an opaque object of a fixed type and value class.
bool hasConditionExpr() const
const Expr * getConditionExpr() const
const Expr * getIntExpr() const
ArrayRef< Expr * > getVarList()
This is the base type for all OpenACC Clauses.
This class represents a compute construct, representing a 'Kind' of ‘parallel’, 'serial',...
A 'default' clause, has the optional 'none' or 'present' argument.
A 'device_type' or 'dtype' clause, takes a list of either an 'asterisk' or an identifier.
An 'if' clause, which has a required condition expression.
llvm::ArrayRef< Expr * > getIntExprs()
A 'self' clause, which has an optional condition expression.
Expr * getDevNumExpr() const
bool hasDevNumExpr() const
llvm::ArrayRef< Expr * > getQueueIdExprs()
A reference to an overloaded function set, either an UnresolvedLookupExpr or an UnresolvedMemberExpr.
Represents a C++11 pack expansion that produces a sequence of expressions.
Expr * getPackIdExpression() const
Expr * getIndexExpr() const
ParenExpr - This represents a parethesized expression, e.g.
Represents a parameter to a function.
[C99 6.4.2.2] - A predefined identifier such as func.
PseudoObjectExpr - An expression which accesses a pseudo-object l-value.
const Expr *const * const_semantics_iterator
A (possibly-)qualified type.
Frontend produces RecoveryExprs on semantic errors that prevent creating other well-formed expression...
C++2a [expr.prim.req]: A requires-expression provides a concise way to express requirements on templa...
ReturnStmt - This represents a return, optionally of an expression: return; return 4;.
Represents a __leave statement.
Represents a __builtin_base_type expression.
QualType getSourceType() const
const Expr * getIndex() const
Represents a __builtin_field_type expression.
QualType getSourceType() const
const Expr * getIndex() const
Represents a __builtin_num_bases expression.
QualType getSourceType() const
Represents a __builtin_num_fields expression.
QualType getSourceType() const
ShuffleVectorExpr - clang-specific builtin-in function __builtin_shufflevector.
Represents an expression that computes the length of a parameter pack.
Represents a function call to one of __builtin_LINE(), __builtin_COLUMN(), __builtin_FUNCTION(),...
StmtExpr - This is the GNU Statement Expression extension: ({int X=4; X;}).
Stmt - This represents one statement.
void ProcessODRHash(llvm::FoldingSetNodeID &ID, ODRHash &Hash) const
Calculate a unique representation for a statement that is stable across compiler invocations.
void Profile(llvm::FoldingSetNodeID &ID, const ASTContext &Context, bool Canonical, bool ProfileLambdaExpr=false) const
Produce a unique representation of the given statement.
StringLiteral - This represents a string literal expression, e.g.
Represents a reference to a non-type template parameter that has been substituted with a template arg...
Expr * getReplacement() const
Represents a reference to a non-type template parameter pack that has been substituted with a non-tem...
SwitchStmt - This represents a 'switch' stmt.
Location wrapper for a TemplateArgument.
Represents a template argument.
QualType getStructuralValueType() const
Get the type of a StructuralValue.
QualType getParamTypeForDecl() const
QualType getAsType() const
Retrieve the type for a type template argument.
llvm::APSInt getAsIntegral() const
Retrieve the template argument as an integral value.
QualType getNullPtrType() const
Retrieve the type for null non-type template argument.
const APValue & getAsStructuralValue() const
Get the value of a StructuralValue.
ValueDecl * getAsDecl() const
Retrieve the declaration for a declaration non-type template argument.
QualType getIntegralType() const
Retrieve the type of the integral value.
@ Declaration
The template argument is a declaration that was provided for a pointer, reference,...
@ Template
The template argument is a template name that was provided for a template template parameter.
@ StructuralValue
The template argument is a non-type template argument that can't be represented by the special-case D...
@ Pack
The template argument is actually a parameter pack.
@ TemplateExpansion
The template argument is a pack expansion of a template name that was provided for a template templat...
@ NullPtr
The template argument is a null pointer or null pointer to member that was provided for a non-type te...
@ Type
The template argument is a type.
@ Null
Represents an empty template argument, e.g., one that has not been deduced.
@ Integral
The template argument is an integral value stored in an llvm::APSInt that was provided for an integra...
@ Expression
The template argument is an expression, and we've not resolved it to one of the other forms yet,...
ArgKind getKind() const
Return the kind of stored template argument.
Expr * getAsExpr() const
Retrieve the template argument as an expression.
ArrayRef< TemplateArgument > pack_elements() const
Iterator range referencing all of the elements of a template argument pack.
TemplateName getAsTemplateOrTemplatePattern() const
Retrieve the template argument as a template name; if the argument is a pack expansion,...
Represents a C++ template name within the type system.
TemplateTemplateParmDecl - Declares a template template parameter, e.g., "T" in.
Declaration of a template type parameter.
Expr * getImmediatelyDeclaredConstraint() const
Get the immediately-declared constraint expression introduced by this type-constraint,...
A type trait used in the implementation of various C++11 and Library TR1 trait templates.
const T * castAs() const
Member-template castAs<specific type>.
TypeClass getTypeClass() const
const T * getAs() const
Member-template getAs<specific type>'.
TypoExpr - Internal placeholder for expressions where typo correction still needs to be performed and...
UnaryExprOrTypeTraitExpr - expression with either a type or (unevaluated) expression operand.
UnaryOperator - This represents the unary-expression's (except sizeof and alignof),...
A reference to a name which we were able to look up during parsing but could not resolve to a specifi...
Represents a C++ member access expression for which lookup produced a set of overloaded functions.
A call to a literal operator (C++11 [over.literal]) written as a user-defined literal (C++11 [lit....
Represents a call to the builtin function __builtin_va_arg.
WhileStmt - This represents a 'while' stmt.
bool isTypeConstraint() const
const TypeConstraint * getTypeConstraint() const
bool isSubstitutionFailure() const
A static requirement that can be used in a requires-expression to check properties of types and expre...
bool Call(InterpState &S, CodePtr OpPC, const Function *Func, uint32_t VarArgSize)
The JSON file list parser is used to communicate input to InstallAPI.
@ OO_None
Not an overloaded operator.
@ NUM_OVERLOADED_OPERATORS
const FunctionProtoType * T
Data for list of allocators.
Expr * AllocatorTraits
Allocator traits.
Expr * Allocator
Allocator.