├── .clang-format ├── .github └── workflows │ └── build.yml ├── .gitignore ├── .gitmodules ├── BootstrapConfig.h.in ├── CMakeLists.txt ├── CODEOWNERS ├── LICENSE ├── README.md ├── bin ├── Blowtorch │ ├── README.md │ └── blowtorch.py ├── BootstrapBuiltins │ ├── Data │ │ ├── x64.c │ │ └── x86.c │ ├── GCC.h │ ├── README.md │ └── bootstrap.py ├── BootstrapMacros │ ├── CMakeLists.txt │ ├── MacroGenerator.cpp │ ├── MacroGenerator.h │ ├── Main.cpp │ └── README.md ├── BootstrapTypes │ ├── CMakeLists.txt │ ├── DeclareCppMethods.cpp │ ├── DeclareEnums.cpp │ ├── DefineCppMethods.cpp │ ├── DefineDefaultMacros.h │ ├── GenerateAttrCpp.cpp │ ├── GenerateAttrH.cpp │ ├── GenerateDeclCpp.cpp │ ├── GenerateDeclH.cpp │ ├── GenerateForwardH.cpp │ ├── GenerateStmtCpp.cpp │ ├── GenerateStmtH.cpp │ ├── GenerateTypeCpp.cpp │ ├── GenerateTypeH.cpp │ ├── Generated.h │ ├── Globals.cpp │ ├── Globals.h │ ├── Main.cpp │ ├── MapRetTypes.cpp │ ├── README.md │ ├── UndefineDefaultMacros.h │ ├── Util.cpp │ └── Util.h ├── CMakeLists.txt ├── Inventory │ ├── Clang.cpp │ ├── PASTA.cpp │ ├── lift.py │ ├── run_on_clang.py │ ├── run_on_pasta.py │ └── schema.py ├── NormalizeCompileCommands │ ├── README.md │ └── normalize.py ├── PrintAST │ ├── CMakeLists.txt │ ├── Main.cpp │ └── README.md ├── PrintAlignedSubstitutions │ ├── CMakeLists.txt │ └── Main.cpp ├── PrintMacroGraph │ ├── CMakeLists.txt │ ├── Main.cpp │ ├── README.md │ └── example.png ├── PrintMainSourceFile │ ├── CMakeLists.txt │ ├── Main.cpp │ └── README.md ├── PrintTokenGraph │ ├── CMakeLists.txt │ ├── Main.cpp │ ├── README.md │ └── example.png └── README.md ├── bindings ├── CMakeLists.txt └── python │ ├── CMakeLists.txt │ └── src │ ├── AST.cpp │ ├── AST │ ├── AArch64SVEPcsAttr.cpp │ ├── AArch64VectorPcsAttr.cpp │ ├── AMDGPUFlatWorkGroupSizeAttr.cpp │ ├── AMDGPUKernelCallAttr.cpp │ ├── AMDGPUNumSGPRAttr.cpp │ ├── AMDGPUNumVGPRAttr.cpp │ ├── AMDGPUWavesPerEUAttr.cpp │ ├── ARMInterruptAttr.cpp │ ├── AST.cpp │ ├── AVRInterruptAttr.cpp │ ├── AVRSignalAttr.cpp │ ├── AbiTagAttr.cpp │ ├── AbstractConditionalOperator.cpp │ ├── AccessSpecDecl.cpp │ ├── AcquireCapabilityAttr.cpp │ ├── AcquireHandleAttr.cpp │ ├── AcquiredAfterAttr.cpp │ ├── AcquiredBeforeAttr.cpp │ ├── AddrLabelExpr.cpp │ ├── AddressSpaceAttr.cpp │ ├── AdjustedType.cpp │ ├── AliasAttr.cpp │ ├── AlignMac68kAttr.cpp │ ├── AlignNaturalAttr.cpp │ ├── AlignValueAttr.cpp │ ├── AlignedAttr.cpp │ ├── AllocAlignAttr.cpp │ ├── AllocSizeAttr.cpp │ ├── AlwaysDestroyAttr.cpp │ ├── AlwaysInlineAttr.cpp │ ├── AnalyzerNoReturnAttr.cpp │ ├── AnnotateAttr.cpp │ ├── AnnotateTypeAttr.cpp │ ├── AnyX86InterruptAttr.cpp │ ├── AnyX86NoCallerSavedRegistersAttr.cpp │ ├── AnyX86NoCfCheckAttr.cpp │ ├── ArcWeakrefUnavailableAttr.cpp │ ├── ArgumentWithTypeTagAttr.cpp │ ├── ArmBuiltinAliasAttr.cpp │ ├── ArmInAttr.cpp │ ├── ArmInOutAttr.cpp │ ├── ArmLocallyStreamingAttr.cpp │ ├── ArmMveStrictPolymorphismAttr.cpp │ ├── ArmNewAttr.cpp │ ├── ArmOutAttr.cpp │ ├── ArmPreservesAttr.cpp │ ├── ArmStreamingAttr.cpp │ ├── ArmStreamingCompatibleAttr.cpp │ ├── ArrayInitIndexExpr.cpp │ ├── ArrayInitLoopExpr.cpp │ ├── ArraySubscriptExpr.cpp │ ├── ArrayType.cpp │ ├── ArrayTypeTraitExpr.cpp │ ├── ArtificialAttr.cpp │ ├── AsTypeExpr.cpp │ ├── AsmLabelAttr.cpp │ ├── AsmStmt.cpp │ ├── AssertCapabilityAttr.cpp │ ├── AssertExclusiveLockAttr.cpp │ ├── AssertSharedLockAttr.cpp │ ├── AssumeAlignedAttr.cpp │ ├── AssumptionAttr.cpp │ ├── AtomicExpr.cpp │ ├── AtomicType.cpp │ ├── Attr.cpp │ ├── AttributedStmt.cpp │ ├── AttributedType.cpp │ ├── AutoType.cpp │ ├── AvailabilityAttr.cpp │ ├── AvailableOnlyInDefaultEvalMethodAttr.cpp │ ├── BPFPreserveAccessIndexAttr.cpp │ ├── BPFPreserveStaticOffsetAttr.cpp │ ├── BTFDeclTagAttr.cpp │ ├── BTFTagAttributedType.cpp │ ├── BTFTypeTagAttr.cpp │ ├── BaseUsingDecl.cpp │ ├── BinaryConditionalOperator.cpp │ ├── BinaryOperator.cpp │ ├── BindingDecl.cpp │ ├── BitIntType.cpp │ ├── BlockDecl.cpp │ ├── BlockExpr.cpp │ ├── BlockPointerType.cpp │ ├── BlocksAttr.cpp │ ├── BreakStmt.cpp │ ├── BuiltinAliasAttr.cpp │ ├── BuiltinAttr.cpp │ ├── BuiltinBitCastExpr.cpp │ ├── BuiltinTemplateDecl.cpp │ ├── BuiltinType.cpp │ ├── C11NoReturnAttr.cpp │ ├── CDeclAttr.cpp │ ├── CFAuditedTransferAttr.cpp │ ├── CFConsumedAttr.cpp │ ├── CFGuardAttr.cpp │ ├── CFICanonicalJumpTableAttr.cpp │ ├── CFReturnsNotRetainedAttr.cpp │ ├── CFReturnsRetainedAttr.cpp │ ├── CFUnknownTransferAttr.cpp │ ├── CMakeLists.txt │ ├── CPUDispatchAttr.cpp │ ├── CPUSpecificAttr.cpp │ ├── CStyleCastExpr.cpp │ ├── CUDAConstantAttr.cpp │ ├── CUDADeviceAttr.cpp │ ├── CUDADeviceBuiltinSurfaceTypeAttr.cpp │ ├── CUDADeviceBuiltinTextureTypeAttr.cpp │ ├── CUDAGlobalAttr.cpp │ ├── CUDAHostAttr.cpp │ ├── CUDAInvalidTargetAttr.cpp │ ├── CUDAKernelCallExpr.cpp │ ├── CUDALaunchBoundsAttr.cpp │ ├── CUDASharedAttr.cpp │ ├── CXX11NoReturnAttr.cpp │ ├── CXXAddrspaceCastExpr.cpp │ ├── CXXBindTemporaryExpr.cpp │ ├── CXXBoolLiteralExpr.cpp │ ├── CXXCatchStmt.cpp │ ├── CXXConstCastExpr.cpp │ ├── CXXConstructExpr.cpp │ ├── CXXConstructorDecl.cpp │ ├── CXXConversionDecl.cpp │ ├── CXXDeductionGuideDecl.cpp │ ├── CXXDefaultArgExpr.cpp │ ├── CXXDefaultInitExpr.cpp │ ├── CXXDeleteExpr.cpp │ ├── CXXDependentScopeMemberExpr.cpp │ ├── CXXDestructorDecl.cpp │ ├── CXXDynamicCastExpr.cpp │ ├── CXXFoldExpr.cpp │ ├── CXXForRangeStmt.cpp │ ├── CXXFunctionalCastExpr.cpp │ ├── CXXInheritedCtorInitExpr.cpp │ ├── CXXMemberCallExpr.cpp │ ├── CXXMethodDecl.cpp │ ├── CXXNamedCastExpr.cpp │ ├── CXXNewExpr.cpp │ ├── CXXNoexceptExpr.cpp │ ├── CXXNullPtrLiteralExpr.cpp │ ├── CXXOperatorCallExpr.cpp │ ├── CXXParenListInitExpr.cpp │ ├── CXXPseudoDestructorExpr.cpp │ ├── CXXRecordDecl.cpp │ ├── CXXReinterpretCastExpr.cpp │ ├── CXXRewrittenBinaryOperator.cpp │ ├── CXXScalarValueInitExpr.cpp │ ├── CXXStaticCastExpr.cpp │ ├── CXXStdInitializerListExpr.cpp │ ├── CXXTemporaryObjectExpr.cpp │ ├── CXXThisExpr.cpp │ ├── CXXThrowExpr.cpp │ ├── CXXTryStmt.cpp │ ├── CXXTypeidExpr.cpp │ ├── CXXUnresolvedConstructExpr.cpp │ ├── CXXUuidofExpr.cpp │ ├── CallExpr.cpp │ ├── CallableWhenAttr.cpp │ ├── CallbackAttr.cpp │ ├── CalledOnceAttr.cpp │ ├── CapabilityAttr.cpp │ ├── CapturedDecl.cpp │ ├── CapturedRecordAttr.cpp │ ├── CapturedStmt.cpp │ ├── CarriesDependencyAttr.cpp │ ├── CaseStmt.cpp │ ├── CastExpr.cpp │ ├── CharacterLiteral.cpp │ ├── ChooseExpr.cpp │ ├── ClassTemplateDecl.cpp │ ├── ClassTemplatePartialSpecializationDecl.cpp │ ├── ClassTemplateSpecializationDecl.cpp │ ├── CleanupAttr.cpp │ ├── CmseNSCallAttr.cpp │ ├── CmseNSEntryAttr.cpp │ ├── CoawaitExpr.cpp │ ├── CodeAlignAttr.cpp │ ├── CodeModelAttr.cpp │ ├── CodeSegAttr.cpp │ ├── ColdAttr.cpp │ ├── CommonAttr.cpp │ ├── ComplexType.cpp │ ├── CompoundAssignOperator.cpp │ ├── CompoundLiteralExpr.cpp │ ├── CompoundStmt.cpp │ ├── ConceptDecl.cpp │ ├── ConceptSpecializationExpr.cpp │ ├── ConditionalOperator.cpp │ ├── ConstAttr.cpp │ ├── ConstInitAttr.cpp │ ├── ConstantArrayType.cpp │ ├── ConstantExpr.cpp │ ├── ConstantMatrixType.cpp │ ├── ConstructorAttr.cpp │ ├── ConstructorUsingShadowDecl.cpp │ ├── ConsumableAttr.cpp │ ├── ConsumableAutoCastAttr.cpp │ ├── ConsumableSetOnReadAttr.cpp │ ├── ContinueStmt.cpp │ ├── ConvergentAttr.cpp │ ├── ConvertVectorExpr.cpp │ ├── CoreturnStmt.cpp │ ├── CoroDisableLifetimeBoundAttr.cpp │ ├── CoroLifetimeBoundAttr.cpp │ ├── CoroOnlyDestroyWhenCompleteAttr.cpp │ ├── CoroReturnTypeAttr.cpp │ ├── CoroWrapperAttr.cpp │ ├── CoroutineBodyStmt.cpp │ ├── CoroutineSuspendExpr.cpp │ ├── CountedByAttr.cpp │ ├── CoyieldExpr.cpp │ ├── DLLExportAttr.cpp │ ├── DLLExportStaticLocalAttr.cpp │ ├── DLLImportAttr.cpp │ ├── DLLImportStaticLocalAttr.cpp │ ├── DecayedType.cpp │ ├── Decl.cpp │ ├── DeclContext.cpp │ ├── DeclOrStmtAttr.cpp │ ├── DeclRefExpr.cpp │ ├── DeclStmt.cpp │ ├── DeclaratorDecl.cpp │ ├── DecltypeType.cpp │ ├── DecompositionDecl.cpp │ ├── DeducedTemplateSpecializationType.cpp │ ├── DeducedType.cpp │ ├── DefaultStmt.cpp │ ├── DependentAddressSpaceType.cpp │ ├── DependentBitIntType.cpp │ ├── DependentCoawaitExpr.cpp │ ├── DependentNameType.cpp │ ├── DependentScopeDeclRefExpr.cpp │ ├── DependentSizedArrayType.cpp │ ├── DependentSizedExtVectorType.cpp │ ├── DependentSizedMatrixType.cpp │ ├── DependentTemplateSpecializationType.cpp │ ├── DependentVectorType.cpp │ ├── DeprecatedAttr.cpp │ ├── DesignatedInitExpr.cpp │ ├── DesignatedInitUpdateExpr.cpp │ ├── DestructorAttr.cpp │ ├── DiagnoseAsBuiltinAttr.cpp │ ├── DiagnoseIfAttr.cpp │ ├── DisableSanitizerInstrumentationAttr.cpp │ ├── DisableTailCallsAttr.cpp │ ├── DoStmt.cpp │ ├── ElaboratedType.cpp │ ├── EmptyBasesAttr.cpp │ ├── EmptyDecl.cpp │ ├── EnableIfAttr.cpp │ ├── EnforceTCBAttr.cpp │ ├── EnforceTCBLeafAttr.cpp │ ├── EnumConstantDecl.cpp │ ├── EnumDecl.cpp │ ├── EnumExtensibilityAttr.cpp │ ├── EnumType.cpp │ ├── Enums.cpp │ ├── ErrorAttr.cpp │ ├── ExcludeFromExplicitInstantiationAttr.cpp │ ├── ExclusiveTrylockFunctionAttr.cpp │ ├── ExplicitCastExpr.cpp │ ├── ExportDecl.cpp │ ├── Expr.cpp │ ├── ExprWithCleanups.cpp │ ├── ExpressionTraitExpr.cpp │ ├── ExtVectorElementExpr.cpp │ ├── ExtVectorType.cpp │ ├── ExternCContextDecl.cpp │ ├── ExternalSourceSymbolAttr.cpp │ ├── FallThroughAttr.cpp │ ├── FastCallAttr.cpp │ ├── FieldDecl.cpp │ ├── FileScopeAsmDecl.cpp │ ├── FinalAttr.cpp │ ├── FixedPointLiteral.cpp │ ├── FlagEnumAttr.cpp │ ├── FlattenAttr.cpp │ ├── FloatingLiteral.cpp │ ├── ForStmt.cpp │ ├── FormatArgAttr.cpp │ ├── FormatAttr.cpp │ ├── FriendDecl.cpp │ ├── FriendTemplateDecl.cpp │ ├── FullExpr.cpp │ ├── FunctionDecl.cpp │ ├── FunctionNoProtoType.cpp │ ├── FunctionParmPackExpr.cpp │ ├── FunctionProtoType.cpp │ ├── FunctionReturnThunksAttr.cpp │ ├── FunctionTemplateDecl.cpp │ ├── FunctionType.cpp │ ├── GCCAsmStmt.cpp │ ├── GNUInlineAttr.cpp │ ├── GNUNullExpr.cpp │ ├── GenericSelectionExpr.cpp │ ├── GotoStmt.cpp │ ├── GuardedByAttr.cpp │ ├── GuardedVarAttr.cpp │ ├── HIPManagedAttr.cpp │ ├── HLSLAnnotationAttr.cpp │ ├── HLSLBufferDecl.cpp │ ├── HLSLGroupSharedAddressSpaceAttr.cpp │ ├── HLSLNumThreadsAttr.cpp │ ├── HLSLParamModifierAttr.cpp │ ├── HLSLResourceAttr.cpp │ ├── HLSLResourceBindingAttr.cpp │ ├── HLSLSV_DispatchThreadIDAttr.cpp │ ├── HLSLSV_GroupIndexAttr.cpp │ ├── HLSLShaderAttr.cpp │ ├── HotAttr.cpp │ ├── IBActionAttr.cpp │ ├── IBOutletAttr.cpp │ ├── IBOutletCollectionAttr.cpp │ ├── IFuncAttr.cpp │ ├── IfStmt.cpp │ ├── ImaginaryLiteral.cpp │ ├── ImplicitCastExpr.cpp │ ├── ImplicitConceptSpecializationDecl.cpp │ ├── ImplicitParamDecl.cpp │ ├── ImplicitValueInitExpr.cpp │ ├── ImportDecl.cpp │ ├── IncompleteArrayType.cpp │ ├── IndirectFieldDecl.cpp │ ├── IndirectGotoStmt.cpp │ ├── InheritableAttr.cpp │ ├── InheritableParamAttr.cpp │ ├── InitListExpr.cpp │ ├── InitPriorityAttr.cpp │ ├── InitSegAttr.cpp │ ├── InjectedClassNameType.cpp │ ├── IntegerLiteral.cpp │ ├── IntelOclBiccAttr.cpp │ ├── InternalLinkageAttr.cpp │ ├── LTOVisibilityPublicAttr.cpp │ ├── LValueReferenceType.cpp │ ├── LabelDecl.cpp │ ├── LabelStmt.cpp │ ├── LambdaExpr.cpp │ ├── LayoutVersionAttr.cpp │ ├── LeafAttr.cpp │ ├── LifetimeBoundAttr.cpp │ ├── LifetimeExtendedTemporaryDecl.cpp │ ├── LikelyAttr.cpp │ ├── LinkageSpecDecl.cpp │ ├── LoaderUninitializedAttr.cpp │ ├── LockReturnedAttr.cpp │ ├── LocksExcludedAttr.cpp │ ├── LoopHintAttr.cpp │ ├── M68kInterruptAttr.cpp │ ├── M68kRTDAttr.cpp │ ├── MIGServerRoutineAttr.cpp │ ├── MSABIAttr.cpp │ ├── MSAllocatorAttr.cpp │ ├── MSAsmStmt.cpp │ ├── MSConstexprAttr.cpp │ ├── MSDependentExistsStmt.cpp │ ├── MSGuidDecl.cpp │ ├── MSInheritanceAttr.cpp │ ├── MSNoVTableAttr.cpp │ ├── MSP430InterruptAttr.cpp │ ├── MSPropertyDecl.cpp │ ├── MSPropertyRefExpr.cpp │ ├── MSPropertySubscriptExpr.cpp │ ├── MSStructAttr.cpp │ ├── MSVtorDispAttr.cpp │ ├── MacroQualifiedType.cpp │ ├── MaterializeTemporaryExpr.cpp │ ├── MatrixSubscriptExpr.cpp │ ├── MatrixType.cpp │ ├── MaxFieldAlignmentAttr.cpp │ ├── MayAliasAttr.cpp │ ├── MaybeUndefAttr.cpp │ ├── MemberExpr.cpp │ ├── MemberPointerType.cpp │ ├── MicroMipsAttr.cpp │ ├── MinSizeAttr.cpp │ ├── MinVectorWidthAttr.cpp │ ├── Mips16Attr.cpp │ ├── MipsInterruptAttr.cpp │ ├── MipsLongCallAttr.cpp │ ├── MipsShortCallAttr.cpp │ ├── ModeAttr.cpp │ ├── MustTailAttr.cpp │ ├── NSConsumedAttr.cpp │ ├── NSConsumesSelfAttr.cpp │ ├── NSErrorDomainAttr.cpp │ ├── NSReturnsAutoreleasedAttr.cpp │ ├── NSReturnsNotRetainedAttr.cpp │ ├── NSReturnsRetainedAttr.cpp │ ├── NVPTXKernelAttr.cpp │ ├── NakedAttr.cpp │ ├── NamedDecl.cpp │ ├── NamespaceAliasDecl.cpp │ ├── NamespaceDecl.cpp │ ├── NoAliasAttr.cpp │ ├── NoBuiltinAttr.cpp │ ├── NoCommonAttr.cpp │ ├── NoDebugAttr.cpp │ ├── NoDerefAttr.cpp │ ├── NoDestroyAttr.cpp │ ├── NoDuplicateAttr.cpp │ ├── NoEscapeAttr.cpp │ ├── NoInitExpr.cpp │ ├── NoInlineAttr.cpp │ ├── NoInstrumentFunctionAttr.cpp │ ├── NoMergeAttr.cpp │ ├── NoMicroMipsAttr.cpp │ ├── NoMips16Attr.cpp │ ├── NoProfileFunctionAttr.cpp │ ├── NoRandomizeLayoutAttr.cpp │ ├── NoReturnAttr.cpp │ ├── NoSanitizeAttr.cpp │ ├── NoSpeculativeLoadHardeningAttr.cpp │ ├── NoSplitStackAttr.cpp │ ├── NoStackProtectorAttr.cpp │ ├── NoThreadSafetyAnalysisAttr.cpp │ ├── NoThrowAttr.cpp │ ├── NoUniqueAddressAttr.cpp │ ├── NoUwtableAttr.cpp │ ├── NonNullAttr.cpp │ ├── NonTypeTemplateParmDecl.cpp │ ├── NotTailCalledAttr.cpp │ ├── NullStmt.cpp │ ├── OMPAllocateDecl.cpp │ ├── OMPAllocateDeclAttr.cpp │ ├── OMPArraySectionExpr.cpp │ ├── OMPArrayShapingExpr.cpp │ ├── OMPAtomicDirective.cpp │ ├── OMPBarrierDirective.cpp │ ├── OMPCancelDirective.cpp │ ├── OMPCancellationPointDirective.cpp │ ├── OMPCanonicalLoop.cpp │ ├── OMPCaptureKindAttr.cpp │ ├── OMPCaptureNoInitAttr.cpp │ ├── OMPCapturedExprDecl.cpp │ ├── OMPCriticalDirective.cpp │ ├── OMPDeclarativeDirectiveDecl.cpp │ ├── OMPDeclarativeDirectiveValueDecl.cpp │ ├── OMPDeclareMapperDecl.cpp │ ├── OMPDeclareReductionDecl.cpp │ ├── OMPDeclareSimdDeclAttr.cpp │ ├── OMPDeclareTargetDeclAttr.cpp │ ├── OMPDeclareVariantAttr.cpp │ ├── OMPDepobjDirective.cpp │ ├── OMPDispatchDirective.cpp │ ├── OMPDistributeDirective.cpp │ ├── OMPDistributeParallelForDirective.cpp │ ├── OMPDistributeParallelForSimdDirective.cpp │ ├── OMPDistributeSimdDirective.cpp │ ├── OMPErrorDirective.cpp │ ├── OMPExecutableDirective.cpp │ ├── OMPFlushDirective.cpp │ ├── OMPForDirective.cpp │ ├── OMPForSimdDirective.cpp │ ├── OMPGenericLoopDirective.cpp │ ├── OMPInteropDirective.cpp │ ├── OMPIteratorExpr.cpp │ ├── OMPLoopBasedDirective.cpp │ ├── OMPLoopDirective.cpp │ ├── OMPLoopTransformationDirective.cpp │ ├── OMPMaskedDirective.cpp │ ├── OMPMaskedTaskLoopDirective.cpp │ ├── OMPMaskedTaskLoopSimdDirective.cpp │ ├── OMPMasterDirective.cpp │ ├── OMPMasterTaskLoopDirective.cpp │ ├── OMPMasterTaskLoopSimdDirective.cpp │ ├── OMPMetaDirective.cpp │ ├── OMPOrderedDirective.cpp │ ├── OMPParallelDirective.cpp │ ├── OMPParallelForDirective.cpp │ ├── OMPParallelForSimdDirective.cpp │ ├── OMPParallelGenericLoopDirective.cpp │ ├── OMPParallelMaskedDirective.cpp │ ├── OMPParallelMaskedTaskLoopDirective.cpp │ ├── OMPParallelMaskedTaskLoopSimdDirective.cpp │ ├── OMPParallelMasterDirective.cpp │ ├── OMPParallelMasterTaskLoopDirective.cpp │ ├── OMPParallelMasterTaskLoopSimdDirective.cpp │ ├── OMPParallelSectionsDirective.cpp │ ├── OMPReferencedVarAttr.cpp │ ├── OMPRequiresDecl.cpp │ ├── OMPScanDirective.cpp │ ├── OMPScopeDirective.cpp │ ├── OMPSectionDirective.cpp │ ├── OMPSectionsDirective.cpp │ ├── OMPSimdDirective.cpp │ ├── OMPSingleDirective.cpp │ ├── OMPTargetDataDirective.cpp │ ├── OMPTargetDirective.cpp │ ├── OMPTargetEnterDataDirective.cpp │ ├── OMPTargetExitDataDirective.cpp │ ├── OMPTargetParallelDirective.cpp │ ├── OMPTargetParallelForDirective.cpp │ ├── OMPTargetParallelForSimdDirective.cpp │ ├── OMPTargetParallelGenericLoopDirective.cpp │ ├── OMPTargetSimdDirective.cpp │ ├── OMPTargetTeamsDirective.cpp │ ├── OMPTargetTeamsDistributeDirective.cpp │ ├── OMPTargetTeamsDistributeParallelForDirective.cpp │ ├── OMPTargetTeamsDistributeParallelForSimdDirective.cpp │ ├── OMPTargetTeamsDistributeSimdDirective.cpp │ ├── OMPTargetTeamsGenericLoopDirective.cpp │ ├── OMPTargetUpdateDirective.cpp │ ├── OMPTaskDirective.cpp │ ├── OMPTaskLoopDirective.cpp │ ├── OMPTaskLoopSimdDirective.cpp │ ├── OMPTaskgroupDirective.cpp │ ├── OMPTaskwaitDirective.cpp │ ├── OMPTaskyieldDirective.cpp │ ├── OMPTeamsDirective.cpp │ ├── OMPTeamsDistributeDirective.cpp │ ├── OMPTeamsDistributeParallelForDirective.cpp │ ├── OMPTeamsDistributeParallelForSimdDirective.cpp │ ├── OMPTeamsDistributeSimdDirective.cpp │ ├── OMPTeamsGenericLoopDirective.cpp │ ├── OMPThreadPrivateDecl.cpp │ ├── OMPThreadPrivateDeclAttr.cpp │ ├── OMPTileDirective.cpp │ ├── OMPUnrollDirective.cpp │ ├── OSConsumedAttr.cpp │ ├── OSConsumesThisAttr.cpp │ ├── OSReturnsNotRetainedAttr.cpp │ ├── OSReturnsRetainedAttr.cpp │ ├── OSReturnsRetainedOnNonZeroAttr.cpp │ ├── OSReturnsRetainedOnZeroAttr.cpp │ ├── ObjCArrayLiteral.cpp │ ├── ObjCAtCatchStmt.cpp │ ├── ObjCAtDefsFieldDecl.cpp │ ├── ObjCAtFinallyStmt.cpp │ ├── ObjCAtSynchronizedStmt.cpp │ ├── ObjCAtThrowStmt.cpp │ ├── ObjCAtTryStmt.cpp │ ├── ObjCAutoreleasePoolStmt.cpp │ ├── ObjCAvailabilityCheckExpr.cpp │ ├── ObjCBoolLiteralExpr.cpp │ ├── ObjCBoxableAttr.cpp │ ├── ObjCBoxedExpr.cpp │ ├── ObjCBridgeAttr.cpp │ ├── ObjCBridgeMutableAttr.cpp │ ├── ObjCBridgeRelatedAttr.cpp │ ├── ObjCBridgedCastExpr.cpp │ ├── ObjCCategoryDecl.cpp │ ├── ObjCCategoryImplDecl.cpp │ ├── ObjCClassStubAttr.cpp │ ├── ObjCCompatibleAliasDecl.cpp │ ├── ObjCContainerDecl.cpp │ ├── ObjCDesignatedInitializerAttr.cpp │ ├── ObjCDictionaryLiteral.cpp │ ├── ObjCDirectAttr.cpp │ ├── ObjCDirectMembersAttr.cpp │ ├── ObjCEncodeExpr.cpp │ ├── ObjCExceptionAttr.cpp │ ├── ObjCExplicitProtocolImplAttr.cpp │ ├── ObjCExternallyRetainedAttr.cpp │ ├── ObjCForCollectionStmt.cpp │ ├── ObjCGCAttr.cpp │ ├── ObjCImplDecl.cpp │ ├── ObjCImplementationDecl.cpp │ ├── ObjCIndependentClassAttr.cpp │ ├── ObjCIndirectCopyRestoreExpr.cpp │ ├── ObjCInertUnsafeUnretainedAttr.cpp │ ├── ObjCInterfaceDecl.cpp │ ├── ObjCInterfaceType.cpp │ ├── ObjCIsaExpr.cpp │ ├── ObjCIvarDecl.cpp │ ├── ObjCIvarRefExpr.cpp │ ├── ObjCKindOfAttr.cpp │ ├── ObjCMessageExpr.cpp │ ├── ObjCMethodDecl.cpp │ ├── ObjCMethodFamilyAttr.cpp │ ├── ObjCNSObjectAttr.cpp │ ├── ObjCNonLazyClassAttr.cpp │ ├── ObjCNonRuntimeProtocolAttr.cpp │ ├── ObjCObjectPointerType.cpp │ ├── ObjCObjectType.cpp │ ├── ObjCOwnershipAttr.cpp │ ├── ObjCPreciseLifetimeAttr.cpp │ ├── ObjCPropertyDecl.cpp │ ├── ObjCPropertyImplDecl.cpp │ ├── ObjCPropertyRefExpr.cpp │ ├── ObjCProtocolDecl.cpp │ ├── ObjCProtocolExpr.cpp │ ├── ObjCRequiresPropertyDefsAttr.cpp │ ├── ObjCRequiresSuperAttr.cpp │ ├── ObjCReturnsInnerPointerAttr.cpp │ ├── ObjCRootClassAttr.cpp │ ├── ObjCRuntimeNameAttr.cpp │ ├── ObjCRuntimeVisibleAttr.cpp │ ├── ObjCSelectorExpr.cpp │ ├── ObjCStringLiteral.cpp │ ├── ObjCSubclassingRestrictedAttr.cpp │ ├── ObjCSubscriptRefExpr.cpp │ ├── ObjCTypeParamDecl.cpp │ ├── ObjCTypeParamType.cpp │ ├── OffsetOfExpr.cpp │ ├── OpaqueValueExpr.cpp │ ├── OpenCLAccessAttr.cpp │ ├── OpenCLConstantAddressSpaceAttr.cpp │ ├── OpenCLGenericAddressSpaceAttr.cpp │ ├── OpenCLGlobalAddressSpaceAttr.cpp │ ├── OpenCLGlobalDeviceAddressSpaceAttr.cpp │ ├── OpenCLGlobalHostAddressSpaceAttr.cpp │ ├── OpenCLIntelReqdSubGroupSizeAttr.cpp │ ├── OpenCLKernelAttr.cpp │ ├── OpenCLLocalAddressSpaceAttr.cpp │ ├── OpenCLPrivateAddressSpaceAttr.cpp │ ├── OpenCLUnrollHintAttr.cpp │ ├── OptimizeNoneAttr.cpp │ ├── OverloadExpr.cpp │ ├── OverloadableAttr.cpp │ ├── OverrideAttr.cpp │ ├── OwnerAttr.cpp │ ├── OwnershipAttr.cpp │ ├── PackExpansionExpr.cpp │ ├── PackExpansionType.cpp │ ├── PackedAttr.cpp │ ├── ParamTypestateAttr.cpp │ ├── ParameterABIAttr.cpp │ ├── ParenExpr.cpp │ ├── ParenListExpr.cpp │ ├── ParenType.cpp │ ├── ParmVarDecl.cpp │ ├── PascalAttr.cpp │ ├── PassObjectSizeAttr.cpp │ ├── PatchableFunctionEntryAttr.cpp │ ├── PcsAttr.cpp │ ├── PipeType.cpp │ ├── PointerAttr.cpp │ ├── PointerType.cpp │ ├── PragmaClangBSSSectionAttr.cpp │ ├── PragmaClangDataSectionAttr.cpp │ ├── PragmaClangRelroSectionAttr.cpp │ ├── PragmaClangRodataSectionAttr.cpp │ ├── PragmaClangTextSectionAttr.cpp │ ├── PragmaCommentDecl.cpp │ ├── PragmaDetectMismatchDecl.cpp │ ├── PredefinedExpr.cpp │ ├── PreferredNameAttr.cpp │ ├── PreferredTypeAttr.cpp │ ├── PreserveAllAttr.cpp │ ├── PreserveMostAttr.cpp │ ├── PseudoObjectExpr.cpp │ ├── PtGuardedByAttr.cpp │ ├── PtGuardedVarAttr.cpp │ ├── Ptr32Attr.cpp │ ├── Ptr64Attr.cpp │ ├── PureAttr.cpp │ ├── QualifiedType.cpp │ ├── RISCVInterruptAttr.cpp │ ├── RValueReferenceType.cpp │ ├── RandomizeLayoutAttr.cpp │ ├── ReadOnlyPlacementAttr.cpp │ ├── RecordDecl.cpp │ ├── RecordType.cpp │ ├── RecoveryExpr.cpp │ ├── RedeclarableTemplateDecl.cpp │ ├── ReferenceType.cpp │ ├── RegCallAttr.cpp │ ├── ReinitializesAttr.cpp │ ├── ReleaseCapabilityAttr.cpp │ ├── ReleaseHandleAttr.cpp │ ├── RenderScriptKernelAttr.cpp │ ├── ReqdWorkGroupSizeAttr.cpp │ ├── RequiresCapabilityAttr.cpp │ ├── RequiresExpr.cpp │ ├── RequiresExprBodyDecl.cpp │ ├── RestrictAttr.cpp │ ├── RetainAttr.cpp │ ├── ReturnStmt.cpp │ ├── ReturnTypestateAttr.cpp │ ├── ReturnsNonNullAttr.cpp │ ├── ReturnsTwiceAttr.cpp │ ├── SEHExceptStmt.cpp │ ├── SEHFinallyStmt.cpp │ ├── SEHLeaveStmt.cpp │ ├── SEHTryStmt.cpp │ ├── SPtrAttr.cpp │ ├── SYCLKernelAttr.cpp │ ├── SYCLSpecialClassAttr.cpp │ ├── SYCLUniqueStableNameExpr.cpp │ ├── ScopedLockableAttr.cpp │ ├── SectionAttr.cpp │ ├── SelectAnyAttr.cpp │ ├── SentinelAttr.cpp │ ├── SetTypestateAttr.cpp │ ├── SharedTrylockFunctionAttr.cpp │ ├── ShuffleVectorExpr.cpp │ ├── SizeOfPackExpr.cpp │ ├── SourceLocExpr.cpp │ ├── SpeculativeLoadHardeningAttr.cpp │ ├── StandaloneDebugAttr.cpp │ ├── StaticAssertDecl.cpp │ ├── StdCallAttr.cpp │ ├── Stmt.cpp │ ├── StmtAttr.cpp │ ├── StmtExpr.cpp │ ├── StrictFPAttr.cpp │ ├── StrictGuardStackCheckAttr.cpp │ ├── StringLiteral.cpp │ ├── SubstNonTypeTemplateParmExpr.cpp │ ├── SubstNonTypeTemplateParmPackExpr.cpp │ ├── SubstTemplateTypeParmPackType.cpp │ ├── SubstTemplateTypeParmType.cpp │ ├── SuppressAttr.cpp │ ├── SwiftAsyncAttr.cpp │ ├── SwiftAsyncCallAttr.cpp │ ├── SwiftAsyncContextAttr.cpp │ ├── SwiftAsyncErrorAttr.cpp │ ├── SwiftAsyncNameAttr.cpp │ ├── SwiftAttrAttr.cpp │ ├── SwiftBridgeAttr.cpp │ ├── SwiftBridgedTypedefAttr.cpp │ ├── SwiftCallAttr.cpp │ ├── SwiftContextAttr.cpp │ ├── SwiftErrorAttr.cpp │ ├── SwiftErrorResultAttr.cpp │ ├── SwiftImportAsNonGenericAttr.cpp │ ├── SwiftImportPropertyAsAccessorsAttr.cpp │ ├── SwiftIndirectResultAttr.cpp │ ├── SwiftNameAttr.cpp │ ├── SwiftNewTypeAttr.cpp │ ├── SwiftObjCMembersAttr.cpp │ ├── SwiftPrivateAttr.cpp │ ├── SwiftVersionedAdditionAttr.cpp │ ├── SwiftVersionedRemovalAttr.cpp │ ├── SwitchCase.cpp │ ├── SwitchStmt.cpp │ ├── SysVABIAttr.cpp │ ├── TLSModelAttr.cpp │ ├── TagDecl.cpp │ ├── TagType.cpp │ ├── TargetAttr.cpp │ ├── TargetClonesAttr.cpp │ ├── TargetVersionAttr.cpp │ ├── TemplateDecl.cpp │ ├── TemplateParamObjectDecl.cpp │ ├── TemplateSpecializationType.cpp │ ├── TemplateTemplateParmDecl.cpp │ ├── TemplateTypeParmDecl.cpp │ ├── TemplateTypeParmType.cpp │ ├── TestTypestateAttr.cpp │ ├── ThisCallAttr.cpp │ ├── ThreadAttr.cpp │ ├── TopLevelStmtDecl.cpp │ ├── TranslationUnitDecl.cpp │ ├── TransparentUnionAttr.cpp │ ├── TrivialABIAttr.cpp │ ├── TryAcquireCapabilityAttr.cpp │ ├── Type.cpp │ ├── TypeAliasDecl.cpp │ ├── TypeAliasTemplateDecl.cpp │ ├── TypeAttr.cpp │ ├── TypeDecl.cpp │ ├── TypeNonNullAttr.cpp │ ├── TypeNullUnspecifiedAttr.cpp │ ├── TypeNullableAttr.cpp │ ├── TypeNullableResultAttr.cpp │ ├── TypeOfExprType.cpp │ ├── TypeOfType.cpp │ ├── TypeTagForDatatypeAttr.cpp │ ├── TypeTraitExpr.cpp │ ├── TypeVisibilityAttr.cpp │ ├── TypeWithKeyword.cpp │ ├── TypedefDecl.cpp │ ├── TypedefNameDecl.cpp │ ├── TypedefType.cpp │ ├── TypoExpr.cpp │ ├── UPtrAttr.cpp │ ├── UnaryExprOrTypeTraitExpr.cpp │ ├── UnaryOperator.cpp │ ├── UnaryTransformType.cpp │ ├── UnavailableAttr.cpp │ ├── UninitializedAttr.cpp │ ├── UnlikelyAttr.cpp │ ├── UnnamedGlobalConstantDecl.cpp │ ├── UnresolvedLookupExpr.cpp │ ├── UnresolvedMemberExpr.cpp │ ├── UnresolvedUsingIfExistsDecl.cpp │ ├── UnresolvedUsingType.cpp │ ├── UnresolvedUsingTypenameDecl.cpp │ ├── UnresolvedUsingValueDecl.cpp │ ├── UnsafeBufferUsageAttr.cpp │ ├── UnusedAttr.cpp │ ├── UseHandleAttr.cpp │ ├── UsedAttr.cpp │ ├── UserDefinedLiteral.cpp │ ├── UsingDecl.cpp │ ├── UsingDirectiveDecl.cpp │ ├── UsingEnumDecl.cpp │ ├── UsingIfExistsAttr.cpp │ ├── UsingPackDecl.cpp │ ├── UsingShadowDecl.cpp │ ├── UsingType.cpp │ ├── UuidAttr.cpp │ ├── VAArgExpr.cpp │ ├── ValueDecl.cpp │ ├── ValueStmt.cpp │ ├── VarDecl.cpp │ ├── VarTemplateDecl.cpp │ ├── VarTemplatePartialSpecializationDecl.cpp │ ├── VarTemplateSpecializationDecl.cpp │ ├── VariableArrayType.cpp │ ├── VecReturnAttr.cpp │ ├── VecTypeHintAttr.cpp │ ├── VectorCallAttr.cpp │ ├── VectorType.cpp │ ├── VisibilityAttr.cpp │ ├── WarnUnusedAttr.cpp │ ├── WarnUnusedResultAttr.cpp │ ├── WeakAttr.cpp │ ├── WeakImportAttr.cpp │ ├── WeakRefAttr.cpp │ ├── WebAssemblyExportNameAttr.cpp │ ├── WebAssemblyFuncrefAttr.cpp │ ├── WebAssemblyImportModuleAttr.cpp │ ├── WebAssemblyImportNameAttr.cpp │ ├── WhileStmt.cpp │ ├── WorkGroupSizeHintAttr.cpp │ ├── X86ForceAlignArgPointerAttr.cpp │ ├── XRayInstrumentAttr.cpp │ ├── XRayLogArgsAttr.cpp │ └── ZeroCallUsedRegsAttr.cpp │ ├── ArgumentVector.cpp │ ├── Bindings.cpp │ ├── Bindings.h │ ├── CompileCommand.cpp │ ├── CompileJob.cpp │ ├── Compiler.cpp │ ├── FileManager.cpp │ ├── FileSystem.cpp │ ├── Macro.cpp │ ├── Module.cpp │ ├── Printer.cpp │ ├── Result.h │ └── Token.cpp ├── cmake ├── ccache.cmake ├── modules │ └── FindFilesystem.cmake ├── options.cmake ├── packaging.cmake ├── settings.cmake └── utils.cmake ├── include └── pasta │ ├── AST │ ├── AST.h │ ├── Attr.h │ ├── AttrManual.h │ ├── Decl.h │ ├── DeclBootstrap.h │ ├── DeclHead.h │ ├── DeclTail.h │ ├── Forward.h │ ├── Macro.h │ ├── Printer.h │ ├── Stmt.h │ ├── StmtBootstrap.h │ ├── StmtManual.h │ ├── Token.h │ ├── Type.h │ ├── TypeBootstrap.h │ └── TypeManual.h │ ├── Compile │ ├── Command.h │ ├── Compiler.h │ └── Job.h │ └── Util │ ├── ArgumentVector.h │ ├── Compiler.h │ ├── Error.h │ ├── File.h │ ├── FileManager.h │ ├── FileSystem.h │ ├── Init.h │ ├── Result.h │ └── StdFileSystem.h ├── lib ├── AST │ ├── AST.cpp │ ├── AST.h │ ├── AlignTokens.cpp │ ├── Attr.cpp │ ├── AttrManual.cpp │ ├── Bounds.cpp │ ├── Builder.cpp │ ├── Builder.h │ ├── Decl.cpp │ ├── DeclBootstrap.cpp │ ├── DeclHead.cpp │ ├── Macro.cpp │ ├── Macro.h │ ├── Printer │ │ ├── DeclPrinter.cpp │ │ ├── DeclStmtPrinter.h │ │ ├── NestedNameSpecifier.cpp │ │ ├── Printer.cpp │ │ ├── Printer.h │ │ ├── StmtPrinter.cpp │ │ ├── TypePrinter.cpp │ │ └── raw_ostream.h │ ├── Stmt.cpp │ ├── StmtBootstrap.cpp │ ├── StmtManual.cpp │ ├── Token.cpp │ ├── Token.h │ ├── Type.cpp │ ├── TypeBootstrap.cpp │ ├── TypeManual.cpp │ └── Util.h ├── Compile │ ├── Builtins.cpp │ ├── BuiltinsARM.h │ ├── BuiltinsPPC.h │ ├── BuiltinsX86.h │ ├── Command.cpp │ ├── Command.h │ ├── Compiler.cpp │ ├── Compiler.h │ ├── Create.cpp │ ├── Diagnostic.cpp │ ├── Diagnostic.h │ ├── FileSystem.cpp │ ├── FileSystem.h │ ├── Host.h.in │ ├── Job.cpp │ ├── Job.h │ ├── ParsedFileTracker.cpp │ ├── ParsedFileTracker.h │ ├── PatchedMacroTracker.cpp │ ├── PatchedMacroTracker.h │ ├── Preprocess.cpp │ ├── Run.cpp │ ├── SplitTokenTracker.cpp │ └── SplitTokenTracker.h └── Util │ ├── ArgumentVector.cpp │ ├── Error.cpp │ ├── File.cpp │ ├── FileManager.cpp │ ├── FileManager.h │ ├── FileSystem.cpp │ └── Init.cpp ├── pastaConfig.cmake.in ├── scripts ├── convert-to-embeddable-string ├── format-added-files ├── format-files ├── format-index ├── render.js └── test-pasta ├── test ├── CMakeLists.txt ├── MacroAlignmentTests │ ├── function_like.c │ └── object_like.c ├── TokenPrintingTests │ ├── EmptyArgumentList.cpp │ ├── FunctionPtrEmptyParamList.cpp │ ├── FunctionPtrVoidParamList.cpp.todo │ ├── QualifiedTypeConversionOperator.cpp │ ├── README.md │ ├── TypeConversionOperator.cpp │ ├── UnqualifiedTypeConversionOperator.cpp │ ├── VariadicArgsLeadingComma.cpp │ ├── VariadicArgsNoLeadingComma.cpp │ ├── VariadicArgsNoLeadingCommaFuncPtrParam.cpp │ └── VoidArgumentList.cpp ├── lit.cfg.py └── lit.site.cfg.py.in └── vendor ├── CMakeLists.txt ├── llvm-project └── CMakeLists.txt └── nanobind └── CMakeLists.txt /.gitignore: -------------------------------------------------------------------------------- 1 | build/* 2 | install/* 3 | .DS_Store 4 | .cproject 5 | .clion 6 | .project 7 | .settings 8 | .vscode/ 9 | *.pyc 10 | 11 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "vendor/llvm-project/src"] 2 | path = vendor/llvm-project/src 3 | url = https://github.com/trail-of-forks/llvm-project.git 4 | branch = pasta 5 | [submodule "vendor/nanobind/src"] 6 | path = vendor/nanobind/src 7 | url = https://github.com/wjakob/nanobind.git -------------------------------------------------------------------------------- /CODEOWNERS: -------------------------------------------------------------------------------- 1 | * @pgoodman 2 | -------------------------------------------------------------------------------- /bin/BootstrapMacros/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2020, Trail of Bits, Inc. 3 | # 4 | # This source code is licensed in accordance with the terms specified in 5 | # the LICENSE file found in the root directory of this source tree. 6 | # 7 | 8 | add_executable(bootstrap-macros 9 | "MacroGenerator.h" 10 | "MacroGenerator.cpp" 11 | "Main.cpp" 12 | ) 13 | 14 | target_link_libraries(bootstrap-macros PRIVATE 15 | pasta_cxx_settings 16 | pasta_thirdparty_llvm 17 | pasta_compiler 18 | pasta_bootstrap_config 19 | ) 20 | -------------------------------------------------------------------------------- /bin/BootstrapTypes/README.md: -------------------------------------------------------------------------------- 1 | # Type Bootstrap 2 | 3 | This is "stage 2" of the PASTA bootstrap process. It uses the generated macros 4 | file to emit PASTA's wrapper API. Running this phase will overwrite multiple 5 | files, including `include/pasta/AST/Forward.h`, `include/pasta/AST/Decl.h`, 6 | `lib/AST/Decl.cpp`, etc. 7 | 8 | # Usage 9 | 10 | ```shell 11 | ./bootstrap-types 12 | ``` -------------------------------------------------------------------------------- /bin/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2021 Trail of Bits, Inc., all rights reserved. 2 | 3 | if(PASTA_BOOTSTRAP_MACROS OR PASTA_BOOTSTRAP_TYPES) 4 | if(PASTA_BOOTSTRAP_MACROS) 5 | add_subdirectory(BootstrapMacros) 6 | endif() 7 | 8 | if(PASTA_BOOTSTRAP_TYPES) 9 | add_subdirectory(BootstrapTypes) 10 | endif() 11 | else() 12 | add_subdirectory(PrintMainSourceFile) 13 | add_subdirectory(PrintAlignedSubstitutions) 14 | add_subdirectory(PrintAST) 15 | add_subdirectory(PrintMacroGraph) 16 | add_subdirectory(PrintTokenGraph) 17 | endif() 18 | -------------------------------------------------------------------------------- /bin/Inventory/PASTA.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include 27 | -------------------------------------------------------------------------------- /bin/NormalizeCompileCommands/README.md: -------------------------------------------------------------------------------- 1 | # Normalize `compile_commands.json` 2 | 3 | `compile_commands.json` aren't as reliable as they seem. The compiler that 4 | invokes your command is likely implicitly using built-in include directories 5 | that are not explicitly represented in each of your commands. This makes it 6 | challenging for independent tools to get consistent/coherent results given the 7 | same set of commands. 8 | 9 | This tool tries to solve this problem by emitting normalized `-cc1` commands 10 | that make implicit things (e.g. include paths, compiler resource directory, 11 | etc.) explicit. 12 | 13 | ## Usage 14 | 15 | ```shell 16 | PYTHONPATH=/path/to/build/pasta/bindings/python \ 17 | python normalize.py \ 18 | --c_compiler `which clang-15` \ 19 | --cxx_compiler `which clang++-15` \ 20 | ./compile_commands.json 21 | ``` 22 | 23 | ## Output 24 | 25 | This command will output a new JSON compilation database to `stdout`. -------------------------------------------------------------------------------- /bin/PrintAST/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2021, Trail of Bits, Inc. 3 | # 4 | # This source code is licensed in accordance with the terms specified in 5 | # the LICENSE file found in the root directory of this source tree. 6 | # 7 | 8 | add_executable(print-ast 9 | "Main.cpp" 10 | ) 11 | 12 | target_link_libraries(print-ast PRIVATE 13 | pasta_cxx_settings 14 | pasta_thirdparty_llvm 15 | pasta_compiler 16 | ) -------------------------------------------------------------------------------- /bin/PrintAST/README.md: -------------------------------------------------------------------------------- 1 | # Pretty print the parsed code 2 | 3 | This utility parses the code, builds an AST, then pretty prints it back to 4 | C/C++ code. You shouldn't expect the output to be identical to what is parsed. 5 | The output will not include comments, and hopefully the whitespace will be 6 | correct. 7 | 8 | ## Usage 9 | 10 | 11 | ```shell 12 | ./print-ast clang test.c 13 | ``` 14 | -------------------------------------------------------------------------------- /bin/PrintAlignedSubstitutions/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2023, Trail of Bits, Inc. 3 | # 4 | # This source code is licensed in accordance with the terms specified in 5 | # the LICENSE file found in the root directory of this source tree. 6 | # 7 | 8 | add_executable(print-aligned-substitutions 9 | "Main.cpp" 10 | ) 11 | 12 | target_link_libraries(print-aligned-substitutions 13 | pasta_cxx_settings 14 | pasta_thirdparty_llvm 15 | pasta_compiler 16 | ) 17 | -------------------------------------------------------------------------------- /bin/PrintMacroGraph/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2022, Trail of Bits, Inc. 3 | # 4 | # This source code is licensed in accordance with the terms specified in 5 | # the LICENSE file found in the root directory of this source tree. 6 | # 7 | 8 | add_executable(print-macro-graph 9 | "Main.cpp" 10 | ) 11 | 12 | target_link_libraries(print-macro-graph PRIVATE 13 | pasta_cxx_settings 14 | pasta_thirdparty_llvm 15 | pasta_compiler 16 | ) -------------------------------------------------------------------------------- /bin/PrintMacroGraph/example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trailofbits/pasta/ea759ee3d7134568cc4cd5e6340d92410ae22888/bin/PrintMacroGraph/example.png -------------------------------------------------------------------------------- /bin/PrintMainSourceFile/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2021, Trail of Bits, Inc. 3 | # 4 | # This source code is licensed in accordance with the terms specified in 5 | # the LICENSE file found in the root directory of this source tree. 6 | # 7 | 8 | add_executable(print-main-source-file 9 | "Main.cpp" 10 | ) 11 | 12 | target_link_libraries(print-main-source-file PRIVATE 13 | pasta_cxx_settings 14 | pasta_thirdparty_llvm 15 | pasta_compiler 16 | ) 17 | -------------------------------------------------------------------------------- /bin/PrintMainSourceFile/README.md: -------------------------------------------------------------------------------- 1 | # Print the main source file of a compile command 2 | 3 | This utility prints out the file contents of the main source file, one token 4 | at a time, of a compile command (after building the AST). It doesn't really 5 | do much else. 6 | 7 | ## Usage 8 | 9 | ```shell 10 | ./print-main-source-file clang test.c 11 | ``` 12 | -------------------------------------------------------------------------------- /bin/PrintTokenGraph/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2021, Trail of Bits, Inc. 3 | # 4 | # This source code is licensed in accordance with the terms specified in 5 | # the LICENSE file found in the root directory of this source tree. 6 | # 7 | 8 | add_executable(print-token-graph 9 | "Main.cpp" 10 | ) 11 | 12 | target_link_libraries(print-token-graph PRIVATE 13 | pasta_cxx_settings 14 | pasta_thirdparty_llvm 15 | pasta_compiler 16 | ) -------------------------------------------------------------------------------- /bin/PrintTokenGraph/example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trailofbits/pasta/ea759ee3d7134568cc4cd5e6340d92410ae22888/bin/PrintTokenGraph/example.png -------------------------------------------------------------------------------- /bin/README.md: -------------------------------------------------------------------------------- 1 | # Bootstrap process 2 | 3 | ```shell 4 | make 5 | ./bootstrap-macros 6 | make 7 | ./bootstrap-types 8 | make 9 | ``` -------------------------------------------------------------------------------- /bindings/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2023 Trail of Bits, Inc., all rights reserved. 2 | 3 | if(PASTA_ENABLE_PY_BINDINGS) 4 | add_subdirectory(python) 5 | endif() -------------------------------------------------------------------------------- /bindings/python/src/AST/AbiTagAttr.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | 16 | #include "../Bindings.h" 17 | 18 | namespace pasta { 19 | namespace nb = nanobind; 20 | 21 | void RegisterAbiTagAttr(nb::module_ &m) { 22 | nb::class_(m, "AbiTagAttr") 23 | .def("__hash__", [](const AbiTagAttr &attr) { return reinterpret_cast(attr.RawAttr()); }) 24 | .def("__eq__", [](const Attr &a, const Attr &b) { return a.RawAttr() == b.RawAttr(); }) 25 | .def("__ne__", [](const Attr &a, const Attr &b) { return a.RawAttr() != b.RawAttr(); }) 26 | .def_prop_ro("spelling", &AbiTagAttr::Spelling); 27 | } 28 | } // namespace pasta 29 | -------------------------------------------------------------------------------- /bindings/python/src/AST/AccessSpecDecl.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023 Trail of Bits, Inc. 3 | */ 4 | 5 | // This file is auto-generated. 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | #include "../Bindings.h" 16 | 17 | namespace pasta { 18 | namespace nb = nanobind; 19 | 20 | void RegisterAccessSpecDecl(nb::module_ &m) { 21 | nb::class_(m, "AccessSpecDecl") 22 | .def_prop_ro("access_specifier_token", &AccessSpecDecl::AccessSpecifierToken) 23 | .def_prop_ro("colon_token", &AccessSpecDecl::ColonToken); 24 | } 25 | } // namespace pasta 26 | -------------------------------------------------------------------------------- /bindings/python/src/AST/AdjustedType.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterAdjustedType(nb::module_ &m) { 24 | nb::class_(m, "AdjustedType") 25 | .def_prop_ro("desugar", &AdjustedType::Desugar) 26 | .def_prop_ro("resolved_type", &AdjustedType::ResolvedType) 27 | .def_prop_ro("original_type", &AdjustedType::OriginalType) 28 | .def_prop_ro("is_sugared", &AdjustedType::IsSugared); 29 | } 30 | } // namespace pasta 31 | -------------------------------------------------------------------------------- /bindings/python/src/AST/ArmInAttr.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | 16 | #include "../Bindings.h" 17 | 18 | namespace pasta { 19 | namespace nb = nanobind; 20 | 21 | void RegisterArmInAttr(nb::module_ &m) { 22 | nb::class_(m, "ArmInAttr") 23 | .def("__hash__", [](const ArmInAttr &attr) { return reinterpret_cast(attr.RawAttr()); }) 24 | .def("__eq__", [](const Attr &a, const Attr &b) { return a.RawAttr() == b.RawAttr(); }) 25 | .def("__ne__", [](const Attr &a, const Attr &b) { return a.RawAttr() != b.RawAttr(); }) 26 | .def_prop_ro("spelling", &ArmInAttr::Spelling); 27 | } 28 | } // namespace pasta 29 | -------------------------------------------------------------------------------- /bindings/python/src/AST/ArmOutAttr.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | 16 | #include "../Bindings.h" 17 | 18 | namespace pasta { 19 | namespace nb = nanobind; 20 | 21 | void RegisterArmOutAttr(nb::module_ &m) { 22 | nb::class_(m, "ArmOutAttr") 23 | .def("__hash__", [](const ArmOutAttr &attr) { return reinterpret_cast(attr.RawAttr()); }) 24 | .def("__eq__", [](const Attr &a, const Attr &b) { return a.RawAttr() == b.RawAttr(); }) 25 | .def("__ne__", [](const Attr &a, const Attr &b) { return a.RawAttr() != b.RawAttr(); }) 26 | .def_prop_ro("spelling", &ArmOutAttr::Spelling); 27 | } 28 | } // namespace pasta 29 | -------------------------------------------------------------------------------- /bindings/python/src/AST/ArrayInitIndexExpr.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterArrayInitIndexExpr(nb::module_ &m) { 24 | nb::class_(m, "ArrayInitIndexExpr") 25 | .def_prop_ro("children", &ArrayInitIndexExpr::Children) 26 | .def_prop_ro("begin_token", &ArrayInitIndexExpr::BeginToken) 27 | .def_prop_ro("end_token", &ArrayInitIndexExpr::EndToken); 28 | } 29 | } // namespace pasta 30 | -------------------------------------------------------------------------------- /bindings/python/src/AST/ArrayType.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterArrayType(nb::module_ &m) { 24 | nb::class_(m, "ArrayType") 25 | .def_prop_ro("element_type", &ArrayType::ElementType) 26 | .def_prop_ro("index_type_cvr_qualifiers", &ArrayType::IndexTypeCVRQualifiers) 27 | .def_prop_ro("size_modifier", &ArrayType::SizeModifier); 28 | } 29 | } // namespace pasta 30 | -------------------------------------------------------------------------------- /bindings/python/src/AST/AtomicType.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterAtomicType(nb::module_ &m) { 24 | nb::class_(m, "AtomicType") 25 | .def_prop_ro("desugar", &AtomicType::Desugar) 26 | .def_prop_ro("value_type", &AtomicType::ValueType) 27 | .def_prop_ro("is_sugared", &AtomicType::IsSugared); 28 | } 29 | } // namespace pasta 30 | -------------------------------------------------------------------------------- /bindings/python/src/AST/BaseUsingDecl.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023 Trail of Bits, Inc. 3 | */ 4 | 5 | // This file is auto-generated. 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | #include "../Bindings.h" 16 | 17 | namespace pasta { 18 | namespace nb = nanobind; 19 | 20 | void RegisterBaseUsingDecl(nb::module_ &m) { 21 | nb::class_(m, "BaseUsingDecl") 22 | .def_prop_ro("shadows", &BaseUsingDecl::Shadows); 23 | } 24 | } // namespace pasta 25 | -------------------------------------------------------------------------------- /bindings/python/src/AST/BindingDecl.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023 Trail of Bits, Inc. 3 | */ 4 | 5 | // This file is auto-generated. 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | #include "../Bindings.h" 16 | 17 | namespace pasta { 18 | namespace nb = nanobind; 19 | 20 | void RegisterBindingDecl(nb::module_ &m) { 21 | nb::class_(m, "BindingDecl") 22 | .def_prop_ro("binding", &BindingDecl::Binding) 23 | .def_prop_ro("decomposed_declaration", &BindingDecl::DecomposedDeclaration) 24 | .def_prop_ro("holding_variable", &BindingDecl::HoldingVariable); 25 | } 26 | } // namespace pasta 27 | -------------------------------------------------------------------------------- /bindings/python/src/AST/BitIntType.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterBitIntType(nb::module_ &m) { 24 | nb::class_(m, "BitIntType") 25 | .def_prop_ro("desugar", &BitIntType::Desugar) 26 | .def_prop_ro("num_bits", &BitIntType::NumBits) 27 | .def_prop_ro("is_signed", &BitIntType::IsSigned) 28 | .def_prop_ro("is_sugared", &BitIntType::IsSugared) 29 | .def_prop_ro("is_unsigned", &BitIntType::IsUnsigned); 30 | } 31 | } // namespace pasta 32 | -------------------------------------------------------------------------------- /bindings/python/src/AST/BlockPointerType.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterBlockPointerType(nb::module_ &m) { 24 | nb::class_(m, "BlockPointerType") 25 | .def_prop_ro("desugar", &BlockPointerType::Desugar) 26 | .def_prop_ro("pointee_type", &BlockPointerType::PointeeType) 27 | .def_prop_ro("is_sugared", &BlockPointerType::IsSugared); 28 | } 29 | } // namespace pasta 30 | -------------------------------------------------------------------------------- /bindings/python/src/AST/BreakStmt.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterBreakStmt(nb::module_ &m) { 24 | nb::class_(m, "BreakStmt") 25 | .def_prop_ro("children", &BreakStmt::Children) 26 | .def_prop_ro("begin_token", &BreakStmt::BeginToken) 27 | .def_prop_ro("break_token", &BreakStmt::BreakToken) 28 | .def_prop_ro("end_token", &BreakStmt::EndToken); 29 | } 30 | } // namespace pasta 31 | -------------------------------------------------------------------------------- /bindings/python/src/AST/BuiltinBitCastExpr.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterBuiltinBitCastExpr(nb::module_ &m) { 24 | nb::class_(m, "BuiltinBitCastExpr") 25 | .def_prop_ro("begin_token", &BuiltinBitCastExpr::BeginToken) 26 | .def_prop_ro("end_token", &BuiltinBitCastExpr::EndToken); 27 | } 28 | } // namespace pasta 29 | -------------------------------------------------------------------------------- /bindings/python/src/AST/BuiltinTemplateDecl.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023 Trail of Bits, Inc. 3 | */ 4 | 5 | // This file is auto-generated. 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | #include "../Bindings.h" 16 | 17 | namespace pasta { 18 | namespace nb = nanobind; 19 | 20 | void RegisterBuiltinTemplateDecl(nb::module_ &m) { 21 | nb::class_(m, "BuiltinTemplateDecl"); 22 | } 23 | } // namespace pasta 24 | -------------------------------------------------------------------------------- /bindings/python/src/AST/CUDAKernelCallExpr.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterCUDAKernelCallExpr(nb::module_ &m) { 24 | nb::class_(m, "CUDAKernelCallExpr") 25 | .def_prop_ro("config", &CUDAKernelCallExpr::Config); 26 | } 27 | } // namespace pasta 28 | -------------------------------------------------------------------------------- /bindings/python/src/AST/CXXAddrspaceCastExpr.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterCXXAddrspaceCastExpr(nb::module_ &m) { 24 | nb::class_(m, "CXXAddrspaceCastExpr"); 25 | } 26 | } // namespace pasta 27 | -------------------------------------------------------------------------------- /bindings/python/src/AST/CXXConstCastExpr.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterCXXConstCastExpr(nb::module_ &m) { 24 | nb::class_(m, "CXXConstCastExpr"); 25 | } 26 | } // namespace pasta 27 | -------------------------------------------------------------------------------- /bindings/python/src/AST/CXXConversionDecl.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023 Trail of Bits, Inc. 3 | */ 4 | 5 | // This file is auto-generated. 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | #include "../Bindings.h" 16 | 17 | namespace pasta { 18 | namespace nb = nanobind; 19 | 20 | void RegisterCXXConversionDecl(nb::module_ &m) { 21 | nb::class_(m, "CXXConversionDecl") 22 | .def_prop_ro("canonical_declaration", &CXXConversionDecl::CanonicalDeclaration) 23 | .def_prop_ro("conversion_type", &CXXConversionDecl::ConversionType) 24 | .def_prop_ro("is_explicit", &CXXConversionDecl::IsExplicit) 25 | .def_prop_ro("is_lambda_to_block_pointer_conversion", &CXXConversionDecl::IsLambdaToBlockPointerConversion); 26 | } 27 | } // namespace pasta 28 | -------------------------------------------------------------------------------- /bindings/python/src/AST/CXXDeductionGuideDecl.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023 Trail of Bits, Inc. 3 | */ 4 | 5 | // This file is auto-generated. 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | #include "../Bindings.h" 16 | 17 | namespace pasta { 18 | namespace nb = nanobind; 19 | 20 | void RegisterCXXDeductionGuideDecl(nb::module_ &m) { 21 | nb::class_(m, "CXXDeductionGuideDecl") 22 | .def_prop_ro("corresponding_constructor", &CXXDeductionGuideDecl::CorrespondingConstructor) 23 | .def_prop_ro("deduced_template", &CXXDeductionGuideDecl::DeducedTemplate) 24 | .def_prop_ro("deduction_candidate_kind", &CXXDeductionGuideDecl::DeductionCandidateKind) 25 | .def_prop_ro("is_explicit", &CXXDeductionGuideDecl::IsExplicit); 26 | } 27 | } // namespace pasta 28 | -------------------------------------------------------------------------------- /bindings/python/src/AST/CXXDestructorDecl.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023 Trail of Bits, Inc. 3 | */ 4 | 5 | // This file is auto-generated. 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | #include "../Bindings.h" 16 | 17 | namespace pasta { 18 | namespace nb = nanobind; 19 | 20 | void RegisterCXXDestructorDecl(nb::module_ &m) { 21 | nb::class_(m, "CXXDestructorDecl") 22 | .def_prop_ro("canonical_declaration", &CXXDestructorDecl::CanonicalDeclaration) 23 | .def_prop_ro("operator_delete", &CXXDestructorDecl::OperatorDelete) 24 | .def_prop_ro("operator_delete_this_argument", &CXXDestructorDecl::OperatorDeleteThisArgument); 25 | } 26 | } // namespace pasta 27 | -------------------------------------------------------------------------------- /bindings/python/src/AST/CXXDynamicCastExpr.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterCXXDynamicCastExpr(nb::module_ &m) { 24 | nb::class_(m, "CXXDynamicCastExpr") 25 | .def_prop_ro("is_always_null", &CXXDynamicCastExpr::IsAlwaysNull); 26 | } 27 | } // namespace pasta 28 | -------------------------------------------------------------------------------- /bindings/python/src/AST/CXXReinterpretCastExpr.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterCXXReinterpretCastExpr(nb::module_ &m) { 24 | nb::class_(m, "CXXReinterpretCastExpr"); 25 | } 26 | } // namespace pasta 27 | -------------------------------------------------------------------------------- /bindings/python/src/AST/CXXStaticCastExpr.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterCXXStaticCastExpr(nb::module_ &m) { 24 | nb::class_(m, "CXXStaticCastExpr"); 25 | } 26 | } // namespace pasta 27 | -------------------------------------------------------------------------------- /bindings/python/src/AST/CXXTemporaryObjectExpr.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterCXXTemporaryObjectExpr(nb::module_ &m) { 24 | nb::class_(m, "CXXTemporaryObjectExpr") 25 | .def_prop_ro("begin_token", &CXXTemporaryObjectExpr::BeginToken) 26 | .def_prop_ro("end_token", &CXXTemporaryObjectExpr::EndToken); 27 | } 28 | } // namespace pasta 29 | -------------------------------------------------------------------------------- /bindings/python/src/AST/CapturedDecl.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023 Trail of Bits, Inc. 3 | */ 4 | 5 | // This file is auto-generated. 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | #include "../Bindings.h" 16 | 17 | namespace pasta { 18 | namespace nb = nanobind; 19 | 20 | void RegisterCapturedDecl(nb::module_ &m) { 21 | nb::class_(m, "CapturedDecl") 22 | .def_prop_ro("context_parameter", &CapturedDecl::ContextParameter) 23 | .def_prop_ro("context_parameter_position", &CapturedDecl::ContextParameterPosition) 24 | .def_prop_ro("num_parameters", &CapturedDecl::NumParameters) 25 | .def_prop_ro("is_nothrow", &CapturedDecl::IsNothrow) 26 | .def_prop_ro("parameters", &CapturedDecl::Parameters); 27 | } 28 | } // namespace pasta 29 | -------------------------------------------------------------------------------- /bindings/python/src/AST/CoawaitExpr.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterCoawaitExpr(nb::module_ &m) { 24 | nb::class_(m, "CoawaitExpr") 25 | .def_prop_ro("is_implicit", &CoawaitExpr::IsImplicit); 26 | } 27 | } // namespace pasta 28 | -------------------------------------------------------------------------------- /bindings/python/src/AST/ColdAttr.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | 16 | #include "../Bindings.h" 17 | 18 | namespace pasta { 19 | namespace nb = nanobind; 20 | 21 | void RegisterColdAttr(nb::module_ &m) { 22 | nb::class_(m, "ColdAttr") 23 | .def("__hash__", [](const ColdAttr &attr) { return reinterpret_cast(attr.RawAttr()); }) 24 | .def("__eq__", [](const Attr &a, const Attr &b) { return a.RawAttr() == b.RawAttr(); }) 25 | .def("__ne__", [](const Attr &a, const Attr &b) { return a.RawAttr() != b.RawAttr(); }) 26 | .def_prop_ro("spelling", &ColdAttr::Spelling); 27 | } 28 | } // namespace pasta 29 | -------------------------------------------------------------------------------- /bindings/python/src/AST/ComplexType.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterComplexType(nb::module_ &m) { 24 | nb::class_(m, "ComplexType") 25 | .def_prop_ro("desugar", &ComplexType::Desugar) 26 | .def_prop_ro("element_type", &ComplexType::ElementType) 27 | .def_prop_ro("is_sugared", &ComplexType::IsSugared); 28 | } 29 | } // namespace pasta 30 | -------------------------------------------------------------------------------- /bindings/python/src/AST/CompoundAssignOperator.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterCompoundAssignOperator(nb::module_ &m) { 24 | nb::class_(m, "CompoundAssignOperator") 25 | .def_prop_ro("computation_lhs_type", &CompoundAssignOperator::ComputationLHSType) 26 | .def_prop_ro("computation_result_type", &CompoundAssignOperator::ComputationResultType); 27 | } 28 | } // namespace pasta 29 | -------------------------------------------------------------------------------- /bindings/python/src/AST/ConceptDecl.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023 Trail of Bits, Inc. 3 | */ 4 | 5 | // This file is auto-generated. 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | #include "../Bindings.h" 16 | 17 | namespace pasta { 18 | namespace nb = nanobind; 19 | 20 | void RegisterConceptDecl(nb::module_ &m) { 21 | nb::class_(m, "ConceptDecl") 22 | .def_prop_ro("canonical_declaration", &ConceptDecl::CanonicalDeclaration) 23 | .def_prop_ro("constraint_expression", &ConceptDecl::ConstraintExpression) 24 | .def_prop_ro("is_type_concept", &ConceptDecl::IsTypeConcept); 25 | } 26 | } // namespace pasta 27 | -------------------------------------------------------------------------------- /bindings/python/src/AST/ConstantMatrixType.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterConstantMatrixType(nb::module_ &m) { 24 | nb::class_(m, "ConstantMatrixType") 25 | .def_prop_ro("num_columns", &ConstantMatrixType::NumColumns) 26 | .def_prop_ro("num_elements_flattened", &ConstantMatrixType::NumElementsFlattened) 27 | .def_prop_ro("num_rows", &ConstantMatrixType::NumRows); 28 | } 29 | } // namespace pasta 30 | -------------------------------------------------------------------------------- /bindings/python/src/AST/ContinueStmt.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterContinueStmt(nb::module_ &m) { 24 | nb::class_(m, "ContinueStmt") 25 | .def_prop_ro("children", &ContinueStmt::Children) 26 | .def_prop_ro("begin_token", &ContinueStmt::BeginToken) 27 | .def_prop_ro("continue_token", &ContinueStmt::ContinueToken) 28 | .def_prop_ro("end_token", &ContinueStmt::EndToken); 29 | } 30 | } // namespace pasta 31 | -------------------------------------------------------------------------------- /bindings/python/src/AST/CoyieldExpr.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterCoyieldExpr(nb::module_ &m) { 24 | nb::class_(m, "CoyieldExpr"); 25 | } 26 | } // namespace pasta 27 | -------------------------------------------------------------------------------- /bindings/python/src/AST/DecayedType.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterDecayedType(nb::module_ &m) { 24 | nb::class_(m, "DecayedType") 25 | .def_prop_ro("resolved_type", &DecayedType::ResolvedType) 26 | .def_prop_ro("pointee_type", &DecayedType::PointeeType); 27 | } 28 | } // namespace pasta 29 | -------------------------------------------------------------------------------- /bindings/python/src/AST/DeclOrStmtAttr.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | 16 | #include "../Bindings.h" 17 | 18 | namespace pasta { 19 | namespace nb = nanobind; 20 | 21 | void RegisterDeclOrStmtAttr(nb::module_ &m) { 22 | nb::class_(m, "DeclOrStmtAttr") 23 | .def("__hash__", [](const DeclOrStmtAttr &attr) { return reinterpret_cast(attr.RawAttr()); }) 24 | .def("__eq__", [](const Attr &a, const Attr &b) { return a.RawAttr() == b.RawAttr(); }) 25 | .def("__ne__", [](const Attr &a, const Attr &b) { return a.RawAttr() != b.RawAttr(); }); 26 | } 27 | } // namespace pasta 28 | -------------------------------------------------------------------------------- /bindings/python/src/AST/DecltypeType.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterDecltypeType(nb::module_ &m) { 24 | nb::class_(m, "DecltypeType") 25 | .def_prop_ro("desugar", &DecltypeType::Desugar) 26 | .def_prop_ro("underlying_expression", &DecltypeType::UnderlyingExpression) 27 | .def_prop_ro("underlying_type", &DecltypeType::UnderlyingType) 28 | .def_prop_ro("is_sugared", &DecltypeType::IsSugared); 29 | } 30 | } // namespace pasta 31 | -------------------------------------------------------------------------------- /bindings/python/src/AST/DecompositionDecl.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023 Trail of Bits, Inc. 3 | */ 4 | 5 | // This file is auto-generated. 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | #include "../Bindings.h" 16 | 17 | namespace pasta { 18 | namespace nb = nanobind; 19 | 20 | void RegisterDecompositionDecl(nb::module_ &m) { 21 | nb::class_(m, "DecompositionDecl") 22 | .def_prop_ro("bindings", &DecompositionDecl::Bindings); 23 | } 24 | } // namespace pasta 25 | -------------------------------------------------------------------------------- /bindings/python/src/AST/DeducedTemplateSpecializationType.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterDeducedTemplateSpecializationType(nb::module_ &m) { 24 | nb::class_(m, "DeducedTemplateSpecializationType"); 25 | } 26 | } // namespace pasta 27 | -------------------------------------------------------------------------------- /bindings/python/src/AST/DeducedType.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterDeducedType(nb::module_ &m) { 24 | nb::class_(m, "DeducedType") 25 | .def_prop_ro("desugar", &DeducedType::Desugar) 26 | .def_prop_ro("resolved_type", &DeducedType::ResolvedType) 27 | .def_prop_ro("is_deduced", &DeducedType::IsDeduced) 28 | .def_prop_ro("is_sugared", &DeducedType::IsSugared); 29 | } 30 | } // namespace pasta 31 | -------------------------------------------------------------------------------- /bindings/python/src/AST/DependentNameType.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterDependentNameType(nb::module_ &m) { 24 | nb::class_(m, "DependentNameType") 25 | .def_prop_ro("desugar", &DependentNameType::Desugar) 26 | .def_prop_ro("is_sugared", &DependentNameType::IsSugared); 27 | } 28 | } // namespace pasta 29 | -------------------------------------------------------------------------------- /bindings/python/src/AST/EmptyDecl.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023 Trail of Bits, Inc. 3 | */ 4 | 5 | // This file is auto-generated. 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | #include "../Bindings.h" 16 | 17 | namespace pasta { 18 | namespace nb = nanobind; 19 | 20 | void RegisterEmptyDecl(nb::module_ &m) { 21 | nb::class_(m, "EmptyDecl"); 22 | } 23 | } // namespace pasta 24 | -------------------------------------------------------------------------------- /bindings/python/src/AST/EnumConstantDecl.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023 Trail of Bits, Inc. 3 | */ 4 | 5 | // This file is auto-generated. 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | #include "../Bindings.h" 16 | 17 | namespace pasta { 18 | namespace nb = nanobind; 19 | 20 | void RegisterEnumConstantDecl(nb::module_ &m) { 21 | nb::class_(m, "EnumConstantDecl") 22 | .def_prop_ro("canonical_declaration", &EnumConstantDecl::CanonicalDeclaration) 23 | .def_prop_ro("initializer_expression", &EnumConstantDecl::InitializerExpression) 24 | .def_prop_ro("initializer_value", &EnumConstantDecl::InitializerValue); 25 | } 26 | } // namespace pasta 27 | -------------------------------------------------------------------------------- /bindings/python/src/AST/EnumType.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterEnumType(nb::module_ &m) { 24 | nb::class_(m, "EnumType") 25 | .def_prop_ro("desugar", &EnumType::Desugar) 26 | .def_prop_ro("declaration", &EnumType::Declaration) 27 | .def_prop_ro("is_sugared", &EnumType::IsSugared); 28 | } 29 | } // namespace pasta 30 | -------------------------------------------------------------------------------- /bindings/python/src/AST/ExplicitCastExpr.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterExplicitCastExpr(nb::module_ &m) { 24 | nb::class_(m, "ExplicitCastExpr") 25 | .def_prop_ro("type_as_written", &ExplicitCastExpr::TypeAsWritten) 26 | .def_prop_ro("type_info_as_written", &ExplicitCastExpr::TypeInfoAsWritten); 27 | } 28 | } // namespace pasta 29 | -------------------------------------------------------------------------------- /bindings/python/src/AST/ExportDecl.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023 Trail of Bits, Inc. 3 | */ 4 | 5 | // This file is auto-generated. 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | #include "../Bindings.h" 16 | 17 | namespace pasta { 18 | namespace nb = nanobind; 19 | 20 | void RegisterExportDecl(nb::module_ &m) { 21 | nb::class_(m, "ExportDecl") 22 | .def_prop_ro("end_token", &ExportDecl::EndToken) 23 | .def_prop_ro("export_token", &ExportDecl::ExportToken) 24 | .def_prop_ro("r_brace_token", &ExportDecl::RBraceToken) 25 | .def_prop_ro("has_braces", &ExportDecl::HasBraces); 26 | } 27 | } // namespace pasta 28 | -------------------------------------------------------------------------------- /bindings/python/src/AST/ExtVectorType.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterExtVectorType(nb::module_ &m) { 24 | nb::class_(m, "ExtVectorType") 25 | .def_prop_ro("desugar", &ExtVectorType::Desugar) 26 | .def_prop_ro("is_sugared", &ExtVectorType::IsSugared); 27 | } 28 | } // namespace pasta 29 | -------------------------------------------------------------------------------- /bindings/python/src/AST/ExternCContextDecl.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023 Trail of Bits, Inc. 3 | */ 4 | 5 | // This file is auto-generated. 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | #include "../Bindings.h" 16 | 17 | namespace pasta { 18 | namespace nb = nanobind; 19 | 20 | void RegisterExternCContextDecl(nb::module_ &m) { 21 | nb::class_(m, "ExternCContextDecl"); 22 | } 23 | } // namespace pasta 24 | -------------------------------------------------------------------------------- /bindings/python/src/AST/FileScopeAsmDecl.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023 Trail of Bits, Inc. 3 | */ 4 | 5 | // This file is auto-generated. 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | #include "../Bindings.h" 16 | 17 | namespace pasta { 18 | namespace nb = nanobind; 19 | 20 | void RegisterFileScopeAsmDecl(nb::module_ &m) { 21 | nb::class_(m, "FileScopeAsmDecl") 22 | .def_prop_ro("assembly_token", &FileScopeAsmDecl::AssemblyToken) 23 | .def_prop_ro("assembly_string", &FileScopeAsmDecl::AssemblyString) 24 | .def_prop_ro("r_paren_token", &FileScopeAsmDecl::RParenToken); 25 | } 26 | } // namespace pasta 27 | -------------------------------------------------------------------------------- /bindings/python/src/AST/FriendDecl.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023 Trail of Bits, Inc. 3 | */ 4 | 5 | // This file is auto-generated. 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | #include "../Bindings.h" 16 | 17 | namespace pasta { 18 | namespace nb = nanobind; 19 | 20 | void RegisterFriendDecl(nb::module_ &m) { 21 | nb::class_(m, "FriendDecl") 22 | .def_prop_ro("friend_declaration", &FriendDecl::FriendDeclaration) 23 | .def_prop_ro("friend_token", &FriendDecl::FriendToken) 24 | .def_prop_ro("friend_type", &FriendDecl::FriendType) 25 | .def_prop_ro("friend_type_num_template_parameter_lists", &FriendDecl::FriendTypeNumTemplateParameterLists) 26 | .def_prop_ro("is_unsupported_friend", &FriendDecl::IsUnsupportedFriend); 27 | } 28 | } // namespace pasta 29 | -------------------------------------------------------------------------------- /bindings/python/src/AST/FriendTemplateDecl.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023 Trail of Bits, Inc. 3 | */ 4 | 5 | // This file is auto-generated. 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | #include "../Bindings.h" 16 | 17 | namespace pasta { 18 | namespace nb = nanobind; 19 | 20 | void RegisterFriendTemplateDecl(nb::module_ &m) { 21 | nb::class_(m, "FriendTemplateDecl") 22 | .def_prop_ro("friend_declaration", &FriendTemplateDecl::FriendDeclaration) 23 | .def_prop_ro("friend_token", &FriendTemplateDecl::FriendToken) 24 | .def_prop_ro("friend_type", &FriendTemplateDecl::FriendType) 25 | .def_prop_ro("num_template_parameters", &FriendTemplateDecl::NumTemplateParameters); 26 | } 27 | } // namespace pasta 28 | -------------------------------------------------------------------------------- /bindings/python/src/AST/FullExpr.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterFullExpr(nb::module_ &m) { 24 | nb::class_(m, "FullExpr") 25 | .def_prop_ro("sub_expression", &FullExpr::SubExpression); 26 | } 27 | } // namespace pasta 28 | -------------------------------------------------------------------------------- /bindings/python/src/AST/FunctionNoProtoType.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterFunctionNoProtoType(nb::module_ &m) { 24 | nb::class_(m, "FunctionNoProtoType") 25 | .def_prop_ro("desugar", &FunctionNoProtoType::Desugar) 26 | .def_prop_ro("is_sugared", &FunctionNoProtoType::IsSugared); 27 | } 28 | } // namespace pasta 29 | -------------------------------------------------------------------------------- /bindings/python/src/AST/GNUNullExpr.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterGNUNullExpr(nb::module_ &m) { 24 | nb::class_(m, "GNUNullExpr") 25 | .def_prop_ro("children", &GNUNullExpr::Children) 26 | .def_prop_ro("begin_token", &GNUNullExpr::BeginToken) 27 | .def_prop_ro("end_token", &GNUNullExpr::EndToken) 28 | .def_prop_ro("token_token", &GNUNullExpr::TokenToken); 29 | } 30 | } // namespace pasta 31 | -------------------------------------------------------------------------------- /bindings/python/src/AST/HLSLAnnotationAttr.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | 16 | #include "../Bindings.h" 17 | 18 | namespace pasta { 19 | namespace nb = nanobind; 20 | 21 | void RegisterHLSLAnnotationAttr(nb::module_ &m) { 22 | nb::class_(m, "HLSLAnnotationAttr") 23 | .def("__hash__", [](const HLSLAnnotationAttr &attr) { return reinterpret_cast(attr.RawAttr()); }) 24 | .def("__eq__", [](const Attr &a, const Attr &b) { return a.RawAttr() == b.RawAttr(); }) 25 | .def("__ne__", [](const Attr &a, const Attr &b) { return a.RawAttr() != b.RawAttr(); }); 26 | } 27 | } // namespace pasta 28 | -------------------------------------------------------------------------------- /bindings/python/src/AST/HLSLBufferDecl.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023 Trail of Bits, Inc. 3 | */ 4 | 5 | // This file is auto-generated. 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | #include "../Bindings.h" 16 | 17 | namespace pasta { 18 | namespace nb = nanobind; 19 | 20 | void RegisterHLSLBufferDecl(nb::module_ &m) { 21 | nb::class_(m, "HLSLBufferDecl") 22 | .def_prop_ro("l_brace_token", &HLSLBufferDecl::LBraceToken) 23 | .def_prop_ro("token_start", &HLSLBufferDecl::TokenStart) 24 | .def_prop_ro("r_brace_token", &HLSLBufferDecl::RBraceToken) 25 | .def_prop_ro("is_c_buffer", &HLSLBufferDecl::IsCBuffer); 26 | } 27 | } // namespace pasta 28 | -------------------------------------------------------------------------------- /bindings/python/src/AST/HotAttr.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | 16 | #include "../Bindings.h" 17 | 18 | namespace pasta { 19 | namespace nb = nanobind; 20 | 21 | void RegisterHotAttr(nb::module_ &m) { 22 | nb::class_(m, "HotAttr") 23 | .def("__hash__", [](const HotAttr &attr) { return reinterpret_cast(attr.RawAttr()); }) 24 | .def("__eq__", [](const Attr &a, const Attr &b) { return a.RawAttr() == b.RawAttr(); }) 25 | .def("__ne__", [](const Attr &a, const Attr &b) { return a.RawAttr() != b.RawAttr(); }) 26 | .def_prop_ro("spelling", &HotAttr::Spelling); 27 | } 28 | } // namespace pasta 29 | -------------------------------------------------------------------------------- /bindings/python/src/AST/ImplicitCastExpr.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterImplicitCastExpr(nb::module_ &m) { 24 | nb::class_(m, "ImplicitCastExpr") 25 | .def_prop_ro("begin_token", &ImplicitCastExpr::BeginToken) 26 | .def_prop_ro("end_token", &ImplicitCastExpr::EndToken) 27 | .def_prop_ro("is_part_of_explicit_cast", &ImplicitCastExpr::IsPartOfExplicitCast); 28 | } 29 | } // namespace pasta 30 | -------------------------------------------------------------------------------- /bindings/python/src/AST/ImplicitConceptSpecializationDecl.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023 Trail of Bits, Inc. 3 | */ 4 | 5 | // This file is auto-generated. 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | #include "../Bindings.h" 16 | 17 | namespace pasta { 18 | namespace nb = nanobind; 19 | 20 | void RegisterImplicitConceptSpecializationDecl(nb::module_ &m) { 21 | nb::class_(m, "ImplicitConceptSpecializationDecl") 22 | .def_prop_ro("template_arguments", &ImplicitConceptSpecializationDecl::TemplateArguments); 23 | } 24 | } // namespace pasta 25 | -------------------------------------------------------------------------------- /bindings/python/src/AST/ImplicitParamDecl.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023 Trail of Bits, Inc. 3 | */ 4 | 5 | // This file is auto-generated. 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | #include "../Bindings.h" 16 | 17 | namespace pasta { 18 | namespace nb = nanobind; 19 | 20 | void RegisterImplicitParamDecl(nb::module_ &m) { 21 | nb::class_(m, "ImplicitParamDecl") 22 | .def_prop_ro("parameter_kind", &ImplicitParamDecl::ParameterKind); 23 | } 24 | } // namespace pasta 25 | -------------------------------------------------------------------------------- /bindings/python/src/AST/ImplicitValueInitExpr.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterImplicitValueInitExpr(nb::module_ &m) { 24 | nb::class_(m, "ImplicitValueInitExpr") 25 | .def_prop_ro("children", &ImplicitValueInitExpr::Children) 26 | .def_prop_ro("begin_token", &ImplicitValueInitExpr::BeginToken) 27 | .def_prop_ro("end_token", &ImplicitValueInitExpr::EndToken); 28 | } 29 | } // namespace pasta 30 | -------------------------------------------------------------------------------- /bindings/python/src/AST/ImportDecl.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023 Trail of Bits, Inc. 3 | */ 4 | 5 | // This file is auto-generated. 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | #include "../Bindings.h" 16 | 17 | namespace pasta { 18 | namespace nb = nanobind; 19 | 20 | void RegisterImportDecl(nb::module_ &m) { 21 | nb::class_(m, "ImportDecl") 22 | .def_prop_ro("identifier_tokens", &ImportDecl::IdentifierTokens); 23 | } 24 | } // namespace pasta 25 | -------------------------------------------------------------------------------- /bindings/python/src/AST/IncompleteArrayType.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterIncompleteArrayType(nb::module_ &m) { 24 | nb::class_(m, "IncompleteArrayType") 25 | .def_prop_ro("desugar", &IncompleteArrayType::Desugar) 26 | .def_prop_ro("is_sugared", &IncompleteArrayType::IsSugared); 27 | } 28 | } // namespace pasta 29 | -------------------------------------------------------------------------------- /bindings/python/src/AST/IndirectFieldDecl.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023 Trail of Bits, Inc. 3 | */ 4 | 5 | // This file is auto-generated. 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | #include "../Bindings.h" 16 | 17 | namespace pasta { 18 | namespace nb = nanobind; 19 | 20 | void RegisterIndirectFieldDecl(nb::module_ &m) { 21 | nb::class_(m, "IndirectFieldDecl") 22 | .def_prop_ro("chain", &IndirectFieldDecl::Chain) 23 | .def_prop_ro("anonymous_field", &IndirectFieldDecl::AnonymousField) 24 | .def_prop_ro("canonical_declaration", &IndirectFieldDecl::CanonicalDeclaration) 25 | .def_prop_ro("chaining_size", &IndirectFieldDecl::ChainingSize) 26 | .def_prop_ro("variable_declaration", &IndirectFieldDecl::VariableDeclaration); 27 | } 28 | } // namespace pasta 29 | -------------------------------------------------------------------------------- /bindings/python/src/AST/IntegerLiteral.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterIntegerLiteral(nb::module_ &m) { 24 | nb::class_(m, "IntegerLiteral") 25 | .def_prop_ro("children", &IntegerLiteral::Children) 26 | .def_prop_ro("begin_token", &IntegerLiteral::BeginToken) 27 | .def_prop_ro("end_token", &IntegerLiteral::EndToken) 28 | .def_prop_ro("token", &IntegerLiteral::Token); 29 | } 30 | } // namespace pasta 31 | -------------------------------------------------------------------------------- /bindings/python/src/AST/LValueReferenceType.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterLValueReferenceType(nb::module_ &m) { 24 | nb::class_(m, "LValueReferenceType") 25 | .def_prop_ro("desugar", &LValueReferenceType::Desugar) 26 | .def_prop_ro("is_sugared", &LValueReferenceType::IsSugared); 27 | } 28 | } // namespace pasta 29 | -------------------------------------------------------------------------------- /bindings/python/src/AST/LabelDecl.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023 Trail of Bits, Inc. 3 | */ 4 | 5 | // This file is auto-generated. 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | #include "../Bindings.h" 16 | 17 | namespace pasta { 18 | namespace nb = nanobind; 19 | 20 | void RegisterLabelDecl(nb::module_ &m) { 21 | nb::class_(m, "LabelDecl") 22 | .def_prop_ro("ms_assembly_label", &LabelDecl::MSAssemblyLabel) 23 | .def_prop_ro("statement", &LabelDecl::Statement) 24 | .def_prop_ro("is_gnu_local", &LabelDecl::IsGnuLocal) 25 | .def_prop_ro("is_ms_assembly_label", &LabelDecl::IsMSAssemblyLabel) 26 | .def_prop_ro("is_resolved_ms_assembly_label", &LabelDecl::IsResolvedMSAssemblyLabel); 27 | } 28 | } // namespace pasta 29 | -------------------------------------------------------------------------------- /bindings/python/src/AST/LeafAttr.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | 16 | #include "../Bindings.h" 17 | 18 | namespace pasta { 19 | namespace nb = nanobind; 20 | 21 | void RegisterLeafAttr(nb::module_ &m) { 22 | nb::class_(m, "LeafAttr") 23 | .def("__hash__", [](const LeafAttr &attr) { return reinterpret_cast(attr.RawAttr()); }) 24 | .def("__eq__", [](const Attr &a, const Attr &b) { return a.RawAttr() == b.RawAttr(); }) 25 | .def("__ne__", [](const Attr &a, const Attr &b) { return a.RawAttr() != b.RawAttr(); }) 26 | .def_prop_ro("spelling", &LeafAttr::Spelling); 27 | } 28 | } // namespace pasta 29 | -------------------------------------------------------------------------------- /bindings/python/src/AST/LinkageSpecDecl.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023 Trail of Bits, Inc. 3 | */ 4 | 5 | // This file is auto-generated. 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | #include "../Bindings.h" 16 | 17 | namespace pasta { 18 | namespace nb = nanobind; 19 | 20 | void RegisterLinkageSpecDecl(nb::module_ &m) { 21 | nb::class_(m, "LinkageSpecDecl") 22 | .def_prop_ro("end_token", &LinkageSpecDecl::EndToken) 23 | .def_prop_ro("extern_token", &LinkageSpecDecl::ExternToken) 24 | .def_prop_ro("language", &LinkageSpecDecl::Language) 25 | .def_prop_ro("r_brace_token", &LinkageSpecDecl::RBraceToken) 26 | .def_prop_ro("has_braces", &LinkageSpecDecl::HasBraces); 27 | } 28 | } // namespace pasta 29 | -------------------------------------------------------------------------------- /bindings/python/src/AST/MSGuidDecl.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023 Trail of Bits, Inc. 3 | */ 4 | 5 | // This file is auto-generated. 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | #include "../Bindings.h" 16 | 17 | namespace pasta { 18 | namespace nb = nanobind; 19 | 20 | void RegisterMSGuidDecl(nb::module_ &m) { 21 | nb::class_(m, "MSGuidDecl"); 22 | } 23 | } // namespace pasta 24 | -------------------------------------------------------------------------------- /bindings/python/src/AST/MSPropertyDecl.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023 Trail of Bits, Inc. 3 | */ 4 | 5 | // This file is auto-generated. 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | #include "../Bindings.h" 16 | 17 | namespace pasta { 18 | namespace nb = nanobind; 19 | 20 | void RegisterMSPropertyDecl(nb::module_ &m) { 21 | nb::class_(m, "MSPropertyDecl") 22 | .def_prop_ro("has_getter", &MSPropertyDecl::HasGetter) 23 | .def_prop_ro("has_setter", &MSPropertyDecl::HasSetter); 24 | } 25 | } // namespace pasta 26 | -------------------------------------------------------------------------------- /bindings/python/src/AST/MatrixType.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterMatrixType(nb::module_ &m) { 24 | nb::class_(m, "MatrixType") 25 | .def_prop_ro("desugar", &MatrixType::Desugar) 26 | .def_prop_ro("element_type", &MatrixType::ElementType) 27 | .def_prop_ro("is_sugared", &MatrixType::IsSugared); 28 | } 29 | } // namespace pasta 30 | -------------------------------------------------------------------------------- /bindings/python/src/AST/ModeAttr.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | 16 | #include "../Bindings.h" 17 | 18 | namespace pasta { 19 | namespace nb = nanobind; 20 | 21 | void RegisterModeAttr(nb::module_ &m) { 22 | nb::class_(m, "ModeAttr") 23 | .def("__hash__", [](const ModeAttr &attr) { return reinterpret_cast(attr.RawAttr()); }) 24 | .def("__eq__", [](const Attr &a, const Attr &b) { return a.RawAttr() == b.RawAttr(); }) 25 | .def("__ne__", [](const Attr &a, const Attr &b) { return a.RawAttr() != b.RawAttr(); }) 26 | .def_prop_ro("spelling", &ModeAttr::Spelling); 27 | } 28 | } // namespace pasta 29 | -------------------------------------------------------------------------------- /bindings/python/src/AST/NoInitExpr.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterNoInitExpr(nb::module_ &m) { 24 | nb::class_(m, "NoInitExpr") 25 | .def_prop_ro("children", &NoInitExpr::Children) 26 | .def_prop_ro("begin_token", &NoInitExpr::BeginToken) 27 | .def_prop_ro("end_token", &NoInitExpr::EndToken); 28 | } 29 | } // namespace pasta 30 | -------------------------------------------------------------------------------- /bindings/python/src/AST/OMPAllocateDecl.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023 Trail of Bits, Inc. 3 | */ 4 | 5 | // This file is auto-generated. 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | #include "../Bindings.h" 16 | 17 | namespace pasta { 18 | namespace nb = nanobind; 19 | 20 | void RegisterOMPAllocateDecl(nb::module_ &m) { 21 | nb::class_(m, "OMPAllocateDecl") 22 | .def_prop_ro("varlists", &OMPAllocateDecl::Varlists); 23 | } 24 | } // namespace pasta 25 | -------------------------------------------------------------------------------- /bindings/python/src/AST/OMPBarrierDirective.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterOMPBarrierDirective(nb::module_ &m) { 24 | nb::class_(m, "OMPBarrierDirective"); 25 | } 26 | } // namespace pasta 27 | -------------------------------------------------------------------------------- /bindings/python/src/AST/OMPCancelDirective.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterOMPCancelDirective(nb::module_ &m) { 24 | nb::class_(m, "OMPCancelDirective"); 25 | } 26 | } // namespace pasta 27 | -------------------------------------------------------------------------------- /bindings/python/src/AST/OMPCancellationPointDirective.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterOMPCancellationPointDirective(nb::module_ &m) { 24 | nb::class_(m, "OMPCancellationPointDirective"); 25 | } 26 | } // namespace pasta 27 | -------------------------------------------------------------------------------- /bindings/python/src/AST/OMPCapturedExprDecl.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023 Trail of Bits, Inc. 3 | */ 4 | 5 | // This file is auto-generated. 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | #include "../Bindings.h" 16 | 17 | namespace pasta { 18 | namespace nb = nanobind; 19 | 20 | void RegisterOMPCapturedExprDecl(nb::module_ &m) { 21 | nb::class_(m, "OMPCapturedExprDecl"); 22 | } 23 | } // namespace pasta 24 | -------------------------------------------------------------------------------- /bindings/python/src/AST/OMPCriticalDirective.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterOMPCriticalDirective(nb::module_ &m) { 24 | nb::class_(m, "OMPCriticalDirective"); 25 | } 26 | } // namespace pasta 27 | -------------------------------------------------------------------------------- /bindings/python/src/AST/OMPDeclarativeDirectiveDecl.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023 Trail of Bits, Inc. 3 | */ 4 | 5 | // This file is auto-generated. 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | #include "../Bindings.h" 16 | 17 | namespace pasta { 18 | namespace nb = nanobind; 19 | 20 | void RegisterOMPDeclarativeDirectiveDecl(nb::module_ &m) { 21 | nb::class_(m, "OMPDeclarativeDirectiveDecl"); 22 | } 23 | } // namespace pasta 24 | -------------------------------------------------------------------------------- /bindings/python/src/AST/OMPDeclarativeDirectiveValueDecl.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023 Trail of Bits, Inc. 3 | */ 4 | 5 | // This file is auto-generated. 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | #include "../Bindings.h" 16 | 17 | namespace pasta { 18 | namespace nb = nanobind; 19 | 20 | void RegisterOMPDeclarativeDirectiveValueDecl(nb::module_ &m) { 21 | nb::class_(m, "OMPDeclarativeDirectiveValueDecl"); 22 | } 23 | } // namespace pasta 24 | -------------------------------------------------------------------------------- /bindings/python/src/AST/OMPDeclareMapperDecl.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023 Trail of Bits, Inc. 3 | */ 4 | 5 | // This file is auto-generated. 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | #include "../Bindings.h" 16 | 17 | namespace pasta { 18 | namespace nb = nanobind; 19 | 20 | void RegisterOMPDeclareMapperDecl(nb::module_ &m) { 21 | nb::class_(m, "OMPDeclareMapperDecl") 22 | .def_prop_ro("mapper_variable_reference", &OMPDeclareMapperDecl::MapperVariableReference) 23 | .def_prop_ro("prev_declaration_in_scope", &OMPDeclareMapperDecl::PrevDeclarationInScope); 24 | } 25 | } // namespace pasta 26 | -------------------------------------------------------------------------------- /bindings/python/src/AST/OMPDepobjDirective.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterOMPDepobjDirective(nb::module_ &m) { 24 | nb::class_(m, "OMPDepobjDirective"); 25 | } 26 | } // namespace pasta 27 | -------------------------------------------------------------------------------- /bindings/python/src/AST/OMPDispatchDirective.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterOMPDispatchDirective(nb::module_ &m) { 24 | nb::class_(m, "OMPDispatchDirective") 25 | .def_prop_ro("target_call_token", &OMPDispatchDirective::TargetCallToken); 26 | } 27 | } // namespace pasta 28 | -------------------------------------------------------------------------------- /bindings/python/src/AST/OMPDistributeDirective.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterOMPDistributeDirective(nb::module_ &m) { 24 | nb::class_(m, "OMPDistributeDirective"); 25 | } 26 | } // namespace pasta 27 | -------------------------------------------------------------------------------- /bindings/python/src/AST/OMPDistributeParallelForSimdDirective.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterOMPDistributeParallelForSimdDirective(nb::module_ &m) { 24 | nb::class_(m, "OMPDistributeParallelForSimdDirective"); 25 | } 26 | } // namespace pasta 27 | -------------------------------------------------------------------------------- /bindings/python/src/AST/OMPDistributeSimdDirective.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterOMPDistributeSimdDirective(nb::module_ &m) { 24 | nb::class_(m, "OMPDistributeSimdDirective"); 25 | } 26 | } // namespace pasta 27 | -------------------------------------------------------------------------------- /bindings/python/src/AST/OMPErrorDirective.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterOMPErrorDirective(nb::module_ &m) { 24 | nb::class_(m, "OMPErrorDirective"); 25 | } 26 | } // namespace pasta 27 | -------------------------------------------------------------------------------- /bindings/python/src/AST/OMPFlushDirective.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterOMPFlushDirective(nb::module_ &m) { 24 | nb::class_(m, "OMPFlushDirective"); 25 | } 26 | } // namespace pasta 27 | -------------------------------------------------------------------------------- /bindings/python/src/AST/OMPForDirective.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterOMPForDirective(nb::module_ &m) { 24 | nb::class_(m, "OMPForDirective") 25 | .def_prop_ro("task_reduction_reference_expression", &OMPForDirective::TaskReductionReferenceExpression) 26 | .def_prop_ro("has_cancel", &OMPForDirective::HasCancel); 27 | } 28 | } // namespace pasta 29 | -------------------------------------------------------------------------------- /bindings/python/src/AST/OMPForSimdDirective.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterOMPForSimdDirective(nb::module_ &m) { 24 | nb::class_(m, "OMPForSimdDirective"); 25 | } 26 | } // namespace pasta 27 | -------------------------------------------------------------------------------- /bindings/python/src/AST/OMPGenericLoopDirective.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterOMPGenericLoopDirective(nb::module_ &m) { 24 | nb::class_(m, "OMPGenericLoopDirective"); 25 | } 26 | } // namespace pasta 27 | -------------------------------------------------------------------------------- /bindings/python/src/AST/OMPInteropDirective.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterOMPInteropDirective(nb::module_ &m) { 24 | nb::class_(m, "OMPInteropDirective"); 25 | } 26 | } // namespace pasta 27 | -------------------------------------------------------------------------------- /bindings/python/src/AST/OMPLoopBasedDirective.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterOMPLoopBasedDirective(nb::module_ &m) { 24 | nb::class_(m, "OMPLoopBasedDirective") 25 | .def_prop_ro("loops_number", &OMPLoopBasedDirective::LoopsNumber); 26 | } 27 | } // namespace pasta 28 | -------------------------------------------------------------------------------- /bindings/python/src/AST/OMPMaskedDirective.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterOMPMaskedDirective(nb::module_ &m) { 24 | nb::class_(m, "OMPMaskedDirective"); 25 | } 26 | } // namespace pasta 27 | -------------------------------------------------------------------------------- /bindings/python/src/AST/OMPMaskedTaskLoopDirective.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterOMPMaskedTaskLoopDirective(nb::module_ &m) { 24 | nb::class_(m, "OMPMaskedTaskLoopDirective") 25 | .def_prop_ro("has_cancel", &OMPMaskedTaskLoopDirective::HasCancel); 26 | } 27 | } // namespace pasta 28 | -------------------------------------------------------------------------------- /bindings/python/src/AST/OMPMaskedTaskLoopSimdDirective.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterOMPMaskedTaskLoopSimdDirective(nb::module_ &m) { 24 | nb::class_(m, "OMPMaskedTaskLoopSimdDirective"); 25 | } 26 | } // namespace pasta 27 | -------------------------------------------------------------------------------- /bindings/python/src/AST/OMPMasterDirective.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterOMPMasterDirective(nb::module_ &m) { 24 | nb::class_(m, "OMPMasterDirective"); 25 | } 26 | } // namespace pasta 27 | -------------------------------------------------------------------------------- /bindings/python/src/AST/OMPMasterTaskLoopDirective.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterOMPMasterTaskLoopDirective(nb::module_ &m) { 24 | nb::class_(m, "OMPMasterTaskLoopDirective") 25 | .def_prop_ro("has_cancel", &OMPMasterTaskLoopDirective::HasCancel); 26 | } 27 | } // namespace pasta 28 | -------------------------------------------------------------------------------- /bindings/python/src/AST/OMPMasterTaskLoopSimdDirective.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterOMPMasterTaskLoopSimdDirective(nb::module_ &m) { 24 | nb::class_(m, "OMPMasterTaskLoopSimdDirective"); 25 | } 26 | } // namespace pasta 27 | -------------------------------------------------------------------------------- /bindings/python/src/AST/OMPMetaDirective.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterOMPMetaDirective(nb::module_ &m) { 24 | nb::class_(m, "OMPMetaDirective") 25 | .def_prop_ro("if_statement", &OMPMetaDirective::IfStatement); 26 | } 27 | } // namespace pasta 28 | -------------------------------------------------------------------------------- /bindings/python/src/AST/OMPOrderedDirective.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterOMPOrderedDirective(nb::module_ &m) { 24 | nb::class_(m, "OMPOrderedDirective"); 25 | } 26 | } // namespace pasta 27 | -------------------------------------------------------------------------------- /bindings/python/src/AST/OMPParallelDirective.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterOMPParallelDirective(nb::module_ &m) { 24 | nb::class_(m, "OMPParallelDirective") 25 | .def_prop_ro("task_reduction_reference_expression", &OMPParallelDirective::TaskReductionReferenceExpression) 26 | .def_prop_ro("has_cancel", &OMPParallelDirective::HasCancel); 27 | } 28 | } // namespace pasta 29 | -------------------------------------------------------------------------------- /bindings/python/src/AST/OMPParallelForDirective.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterOMPParallelForDirective(nb::module_ &m) { 24 | nb::class_(m, "OMPParallelForDirective") 25 | .def_prop_ro("task_reduction_reference_expression", &OMPParallelForDirective::TaskReductionReferenceExpression) 26 | .def_prop_ro("has_cancel", &OMPParallelForDirective::HasCancel); 27 | } 28 | } // namespace pasta 29 | -------------------------------------------------------------------------------- /bindings/python/src/AST/OMPParallelForSimdDirective.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterOMPParallelForSimdDirective(nb::module_ &m) { 24 | nb::class_(m, "OMPParallelForSimdDirective"); 25 | } 26 | } // namespace pasta 27 | -------------------------------------------------------------------------------- /bindings/python/src/AST/OMPParallelGenericLoopDirective.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterOMPParallelGenericLoopDirective(nb::module_ &m) { 24 | nb::class_(m, "OMPParallelGenericLoopDirective"); 25 | } 26 | } // namespace pasta 27 | -------------------------------------------------------------------------------- /bindings/python/src/AST/OMPParallelMaskedDirective.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterOMPParallelMaskedDirective(nb::module_ &m) { 24 | nb::class_(m, "OMPParallelMaskedDirective") 25 | .def_prop_ro("task_reduction_reference_expression", &OMPParallelMaskedDirective::TaskReductionReferenceExpression); 26 | } 27 | } // namespace pasta 28 | -------------------------------------------------------------------------------- /bindings/python/src/AST/OMPParallelMaskedTaskLoopDirective.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterOMPParallelMaskedTaskLoopDirective(nb::module_ &m) { 24 | nb::class_(m, "OMPParallelMaskedTaskLoopDirective") 25 | .def_prop_ro("has_cancel", &OMPParallelMaskedTaskLoopDirective::HasCancel); 26 | } 27 | } // namespace pasta 28 | -------------------------------------------------------------------------------- /bindings/python/src/AST/OMPParallelMaskedTaskLoopSimdDirective.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterOMPParallelMaskedTaskLoopSimdDirective(nb::module_ &m) { 24 | nb::class_(m, "OMPParallelMaskedTaskLoopSimdDirective"); 25 | } 26 | } // namespace pasta 27 | -------------------------------------------------------------------------------- /bindings/python/src/AST/OMPParallelMasterDirective.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterOMPParallelMasterDirective(nb::module_ &m) { 24 | nb::class_(m, "OMPParallelMasterDirective") 25 | .def_prop_ro("task_reduction_reference_expression", &OMPParallelMasterDirective::TaskReductionReferenceExpression); 26 | } 27 | } // namespace pasta 28 | -------------------------------------------------------------------------------- /bindings/python/src/AST/OMPParallelMasterTaskLoopDirective.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterOMPParallelMasterTaskLoopDirective(nb::module_ &m) { 24 | nb::class_(m, "OMPParallelMasterTaskLoopDirective") 25 | .def_prop_ro("has_cancel", &OMPParallelMasterTaskLoopDirective::HasCancel); 26 | } 27 | } // namespace pasta 28 | -------------------------------------------------------------------------------- /bindings/python/src/AST/OMPParallelMasterTaskLoopSimdDirective.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterOMPParallelMasterTaskLoopSimdDirective(nb::module_ &m) { 24 | nb::class_(m, "OMPParallelMasterTaskLoopSimdDirective"); 25 | } 26 | } // namespace pasta 27 | -------------------------------------------------------------------------------- /bindings/python/src/AST/OMPRequiresDecl.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023 Trail of Bits, Inc. 3 | */ 4 | 5 | // This file is auto-generated. 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | #include "../Bindings.h" 16 | 17 | namespace pasta { 18 | namespace nb = nanobind; 19 | 20 | void RegisterOMPRequiresDecl(nb::module_ &m) { 21 | nb::class_(m, "OMPRequiresDecl"); 22 | } 23 | } // namespace pasta 24 | -------------------------------------------------------------------------------- /bindings/python/src/AST/OMPScanDirective.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterOMPScanDirective(nb::module_ &m) { 24 | nb::class_(m, "OMPScanDirective"); 25 | } 26 | } // namespace pasta 27 | -------------------------------------------------------------------------------- /bindings/python/src/AST/OMPScopeDirective.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterOMPScopeDirective(nb::module_ &m) { 24 | nb::class_(m, "OMPScopeDirective"); 25 | } 26 | } // namespace pasta 27 | -------------------------------------------------------------------------------- /bindings/python/src/AST/OMPSectionDirective.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterOMPSectionDirective(nb::module_ &m) { 24 | nb::class_(m, "OMPSectionDirective") 25 | .def_prop_ro("has_cancel", &OMPSectionDirective::HasCancel); 26 | } 27 | } // namespace pasta 28 | -------------------------------------------------------------------------------- /bindings/python/src/AST/OMPSectionsDirective.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterOMPSectionsDirective(nb::module_ &m) { 24 | nb::class_(m, "OMPSectionsDirective") 25 | .def_prop_ro("task_reduction_reference_expression", &OMPSectionsDirective::TaskReductionReferenceExpression) 26 | .def_prop_ro("has_cancel", &OMPSectionsDirective::HasCancel); 27 | } 28 | } // namespace pasta 29 | -------------------------------------------------------------------------------- /bindings/python/src/AST/OMPSimdDirective.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterOMPSimdDirective(nb::module_ &m) { 24 | nb::class_(m, "OMPSimdDirective"); 25 | } 26 | } // namespace pasta 27 | -------------------------------------------------------------------------------- /bindings/python/src/AST/OMPSingleDirective.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterOMPSingleDirective(nb::module_ &m) { 24 | nb::class_(m, "OMPSingleDirective"); 25 | } 26 | } // namespace pasta 27 | -------------------------------------------------------------------------------- /bindings/python/src/AST/OMPTargetDataDirective.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterOMPTargetDataDirective(nb::module_ &m) { 24 | nb::class_(m, "OMPTargetDataDirective"); 25 | } 26 | } // namespace pasta 27 | -------------------------------------------------------------------------------- /bindings/python/src/AST/OMPTargetDirective.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterOMPTargetDirective(nb::module_ &m) { 24 | nb::class_(m, "OMPTargetDirective"); 25 | } 26 | } // namespace pasta 27 | -------------------------------------------------------------------------------- /bindings/python/src/AST/OMPTargetEnterDataDirective.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterOMPTargetEnterDataDirective(nb::module_ &m) { 24 | nb::class_(m, "OMPTargetEnterDataDirective"); 25 | } 26 | } // namespace pasta 27 | -------------------------------------------------------------------------------- /bindings/python/src/AST/OMPTargetExitDataDirective.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterOMPTargetExitDataDirective(nb::module_ &m) { 24 | nb::class_(m, "OMPTargetExitDataDirective"); 25 | } 26 | } // namespace pasta 27 | -------------------------------------------------------------------------------- /bindings/python/src/AST/OMPTargetParallelDirective.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterOMPTargetParallelDirective(nb::module_ &m) { 24 | nb::class_(m, "OMPTargetParallelDirective") 25 | .def_prop_ro("task_reduction_reference_expression", &OMPTargetParallelDirective::TaskReductionReferenceExpression) 26 | .def_prop_ro("has_cancel", &OMPTargetParallelDirective::HasCancel); 27 | } 28 | } // namespace pasta 29 | -------------------------------------------------------------------------------- /bindings/python/src/AST/OMPTargetParallelForSimdDirective.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterOMPTargetParallelForSimdDirective(nb::module_ &m) { 24 | nb::class_(m, "OMPTargetParallelForSimdDirective"); 25 | } 26 | } // namespace pasta 27 | -------------------------------------------------------------------------------- /bindings/python/src/AST/OMPTargetParallelGenericLoopDirective.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterOMPTargetParallelGenericLoopDirective(nb::module_ &m) { 24 | nb::class_(m, "OMPTargetParallelGenericLoopDirective"); 25 | } 26 | } // namespace pasta 27 | -------------------------------------------------------------------------------- /bindings/python/src/AST/OMPTargetSimdDirective.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterOMPTargetSimdDirective(nb::module_ &m) { 24 | nb::class_(m, "OMPTargetSimdDirective"); 25 | } 26 | } // namespace pasta 27 | -------------------------------------------------------------------------------- /bindings/python/src/AST/OMPTargetTeamsDirective.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterOMPTargetTeamsDirective(nb::module_ &m) { 24 | nb::class_(m, "OMPTargetTeamsDirective"); 25 | } 26 | } // namespace pasta 27 | -------------------------------------------------------------------------------- /bindings/python/src/AST/OMPTargetTeamsDistributeDirective.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterOMPTargetTeamsDistributeDirective(nb::module_ &m) { 24 | nb::class_(m, "OMPTargetTeamsDistributeDirective"); 25 | } 26 | } // namespace pasta 27 | -------------------------------------------------------------------------------- /bindings/python/src/AST/OMPTargetTeamsDistributeParallelForSimdDirective.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterOMPTargetTeamsDistributeParallelForSimdDirective(nb::module_ &m) { 24 | nb::class_(m, "OMPTargetTeamsDistributeParallelForSimdDirective"); 25 | } 26 | } // namespace pasta 27 | -------------------------------------------------------------------------------- /bindings/python/src/AST/OMPTargetTeamsDistributeSimdDirective.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterOMPTargetTeamsDistributeSimdDirective(nb::module_ &m) { 24 | nb::class_(m, "OMPTargetTeamsDistributeSimdDirective"); 25 | } 26 | } // namespace pasta 27 | -------------------------------------------------------------------------------- /bindings/python/src/AST/OMPTargetTeamsGenericLoopDirective.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterOMPTargetTeamsGenericLoopDirective(nb::module_ &m) { 24 | nb::class_(m, "OMPTargetTeamsGenericLoopDirective"); 25 | } 26 | } // namespace pasta 27 | -------------------------------------------------------------------------------- /bindings/python/src/AST/OMPTargetUpdateDirective.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterOMPTargetUpdateDirective(nb::module_ &m) { 24 | nb::class_(m, "OMPTargetUpdateDirective"); 25 | } 26 | } // namespace pasta 27 | -------------------------------------------------------------------------------- /bindings/python/src/AST/OMPTaskDirective.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterOMPTaskDirective(nb::module_ &m) { 24 | nb::class_(m, "OMPTaskDirective") 25 | .def_prop_ro("has_cancel", &OMPTaskDirective::HasCancel); 26 | } 27 | } // namespace pasta 28 | -------------------------------------------------------------------------------- /bindings/python/src/AST/OMPTaskLoopDirective.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterOMPTaskLoopDirective(nb::module_ &m) { 24 | nb::class_(m, "OMPTaskLoopDirective") 25 | .def_prop_ro("has_cancel", &OMPTaskLoopDirective::HasCancel); 26 | } 27 | } // namespace pasta 28 | -------------------------------------------------------------------------------- /bindings/python/src/AST/OMPTaskLoopSimdDirective.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterOMPTaskLoopSimdDirective(nb::module_ &m) { 24 | nb::class_(m, "OMPTaskLoopSimdDirective"); 25 | } 26 | } // namespace pasta 27 | -------------------------------------------------------------------------------- /bindings/python/src/AST/OMPTaskgroupDirective.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterOMPTaskgroupDirective(nb::module_ &m) { 24 | nb::class_(m, "OMPTaskgroupDirective") 25 | .def_prop_ro("reduction_reference", &OMPTaskgroupDirective::ReductionReference); 26 | } 27 | } // namespace pasta 28 | -------------------------------------------------------------------------------- /bindings/python/src/AST/OMPTaskwaitDirective.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterOMPTaskwaitDirective(nb::module_ &m) { 24 | nb::class_(m, "OMPTaskwaitDirective"); 25 | } 26 | } // namespace pasta 27 | -------------------------------------------------------------------------------- /bindings/python/src/AST/OMPTaskyieldDirective.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterOMPTaskyieldDirective(nb::module_ &m) { 24 | nb::class_(m, "OMPTaskyieldDirective"); 25 | } 26 | } // namespace pasta 27 | -------------------------------------------------------------------------------- /bindings/python/src/AST/OMPTeamsDirective.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterOMPTeamsDirective(nb::module_ &m) { 24 | nb::class_(m, "OMPTeamsDirective"); 25 | } 26 | } // namespace pasta 27 | -------------------------------------------------------------------------------- /bindings/python/src/AST/OMPTeamsDistributeDirective.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterOMPTeamsDistributeDirective(nb::module_ &m) { 24 | nb::class_(m, "OMPTeamsDistributeDirective"); 25 | } 26 | } // namespace pasta 27 | -------------------------------------------------------------------------------- /bindings/python/src/AST/OMPTeamsDistributeParallelForSimdDirective.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterOMPTeamsDistributeParallelForSimdDirective(nb::module_ &m) { 24 | nb::class_(m, "OMPTeamsDistributeParallelForSimdDirective"); 25 | } 26 | } // namespace pasta 27 | -------------------------------------------------------------------------------- /bindings/python/src/AST/OMPTeamsDistributeSimdDirective.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterOMPTeamsDistributeSimdDirective(nb::module_ &m) { 24 | nb::class_(m, "OMPTeamsDistributeSimdDirective"); 25 | } 26 | } // namespace pasta 27 | -------------------------------------------------------------------------------- /bindings/python/src/AST/OMPTeamsGenericLoopDirective.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterOMPTeamsGenericLoopDirective(nb::module_ &m) { 24 | nb::class_(m, "OMPTeamsGenericLoopDirective"); 25 | } 26 | } // namespace pasta 27 | -------------------------------------------------------------------------------- /bindings/python/src/AST/OMPThreadPrivateDecl.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023 Trail of Bits, Inc. 3 | */ 4 | 5 | // This file is auto-generated. 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | #include "../Bindings.h" 16 | 17 | namespace pasta { 18 | namespace nb = nanobind; 19 | 20 | void RegisterOMPThreadPrivateDecl(nb::module_ &m) { 21 | nb::class_(m, "OMPThreadPrivateDecl") 22 | .def_prop_ro("varlists", &OMPThreadPrivateDecl::Varlists); 23 | } 24 | } // namespace pasta 25 | -------------------------------------------------------------------------------- /bindings/python/src/AST/OMPTileDirective.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterOMPTileDirective(nb::module_ &m) { 24 | nb::class_(m, "OMPTileDirective") 25 | .def_prop_ro("pre_initializers", &OMPTileDirective::PreInitializers) 26 | .def_prop_ro("transformed_statement", &OMPTileDirective::TransformedStatement); 27 | } 28 | } // namespace pasta 29 | -------------------------------------------------------------------------------- /bindings/python/src/AST/OMPUnrollDirective.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterOMPUnrollDirective(nb::module_ &m) { 24 | nb::class_(m, "OMPUnrollDirective") 25 | .def_prop_ro("pre_initializers", &OMPUnrollDirective::PreInitializers) 26 | .def_prop_ro("transformed_statement", &OMPUnrollDirective::TransformedStatement); 27 | } 28 | } // namespace pasta 29 | -------------------------------------------------------------------------------- /bindings/python/src/AST/ObjCAtDefsFieldDecl.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023 Trail of Bits, Inc. 3 | */ 4 | 5 | // This file is auto-generated. 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | #include "../Bindings.h" 16 | 17 | namespace pasta { 18 | namespace nb = nanobind; 19 | 20 | void RegisterObjCAtDefsFieldDecl(nb::module_ &m) { 21 | nb::class_(m, "ObjCAtDefsFieldDecl"); 22 | } 23 | } // namespace pasta 24 | -------------------------------------------------------------------------------- /bindings/python/src/AST/ObjCCategoryImplDecl.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023 Trail of Bits, Inc. 3 | */ 4 | 5 | // This file is auto-generated. 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | #include "../Bindings.h" 16 | 17 | namespace pasta { 18 | namespace nb = nanobind; 19 | 20 | void RegisterObjCCategoryImplDecl(nb::module_ &m) { 21 | nb::class_(m, "ObjCCategoryImplDecl") 22 | .def_prop_ro("category_declaration", &ObjCCategoryImplDecl::CategoryDeclaration) 23 | .def_prop_ro("category_name_token", &ObjCCategoryImplDecl::CategoryNameToken); 24 | } 25 | } // namespace pasta 26 | -------------------------------------------------------------------------------- /bindings/python/src/AST/ObjCCompatibleAliasDecl.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023 Trail of Bits, Inc. 3 | */ 4 | 5 | // This file is auto-generated. 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | #include "../Bindings.h" 16 | 17 | namespace pasta { 18 | namespace nb = nanobind; 19 | 20 | void RegisterObjCCompatibleAliasDecl(nb::module_ &m) { 21 | nb::class_(m, "ObjCCompatibleAliasDecl") 22 | .def_prop_ro("class_interface", &ObjCCompatibleAliasDecl::ClassInterface); 23 | } 24 | } // namespace pasta 25 | -------------------------------------------------------------------------------- /bindings/python/src/AST/ObjCImplDecl.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023 Trail of Bits, Inc. 3 | */ 4 | 5 | // This file is auto-generated. 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | #include "../Bindings.h" 16 | 17 | namespace pasta { 18 | namespace nb = nanobind; 19 | 20 | void RegisterObjCImplDecl(nb::module_ &m) { 21 | nb::class_(m, "ObjCImplDecl") 22 | .def_prop_ro("class_interface", &ObjCImplDecl::ClassInterface) 23 | .def_prop_ro("property_implementations", &ObjCImplDecl::PropertyImplementations); 24 | } 25 | } // namespace pasta 26 | -------------------------------------------------------------------------------- /bindings/python/src/AST/ObjCInterfaceType.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterObjCInterfaceType(nb::module_ &m) { 24 | nb::class_(m, "ObjCInterfaceType") 25 | .def_prop_ro("desugar", &ObjCInterfaceType::Desugar) 26 | .def_prop_ro("declaration", &ObjCInterfaceType::Declaration) 27 | .def_prop_ro("is_sugared", &ObjCInterfaceType::IsSugared); 28 | } 29 | } // namespace pasta 30 | -------------------------------------------------------------------------------- /bindings/python/src/AST/ObjCTypeParamDecl.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023 Trail of Bits, Inc. 3 | */ 4 | 5 | // This file is auto-generated. 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | #include "../Bindings.h" 16 | 17 | namespace pasta { 18 | namespace nb = nanobind; 19 | 20 | void RegisterObjCTypeParamDecl(nb::module_ &m) { 21 | nb::class_(m, "ObjCTypeParamDecl") 22 | .def_prop_ro("colon_token", &ObjCTypeParamDecl::ColonToken) 23 | .def_prop_ro("index", &ObjCTypeParamDecl::Index) 24 | .def_prop_ro("variance", &ObjCTypeParamDecl::Variance) 25 | .def_prop_ro("variance_token", &ObjCTypeParamDecl::VarianceToken) 26 | .def_prop_ro("has_explicit_bound", &ObjCTypeParamDecl::HasExplicitBound); 27 | } 28 | } // namespace pasta 29 | -------------------------------------------------------------------------------- /bindings/python/src/AST/ObjCTypeParamType.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterObjCTypeParamType(nb::module_ &m) { 24 | nb::class_(m, "ObjCTypeParamType") 25 | .def_prop_ro("desugar", &ObjCTypeParamType::Desugar) 26 | .def_prop_ro("declaration", &ObjCTypeParamType::Declaration) 27 | .def_prop_ro("is_sugared", &ObjCTypeParamType::IsSugared); 28 | } 29 | } // namespace pasta 30 | -------------------------------------------------------------------------------- /bindings/python/src/AST/ParenType.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterParenType(nb::module_ &m) { 24 | nb::class_(m, "ParenType") 25 | .def_prop_ro("desugar", &ParenType::Desugar) 26 | .def_prop_ro("inner_type", &ParenType::InnerType) 27 | .def_prop_ro("is_sugared", &ParenType::IsSugared); 28 | } 29 | } // namespace pasta 30 | -------------------------------------------------------------------------------- /bindings/python/src/AST/PipeType.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterPipeType(nb::module_ &m) { 24 | nb::class_(m, "PipeType") 25 | .def_prop_ro("desugar", &PipeType::Desugar) 26 | .def_prop_ro("element_type", &PipeType::ElementType) 27 | .def_prop_ro("is_read_only", &PipeType::IsReadOnly) 28 | .def_prop_ro("is_sugared", &PipeType::IsSugared); 29 | } 30 | } // namespace pasta 31 | -------------------------------------------------------------------------------- /bindings/python/src/AST/PointerType.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterPointerType(nb::module_ &m) { 24 | nb::class_(m, "PointerType") 25 | .def_prop_ro("desugar", &PointerType::Desugar) 26 | .def_prop_ro("pointee_type", &PointerType::PointeeType) 27 | .def_prop_ro("is_sugared", &PointerType::IsSugared); 28 | } 29 | } // namespace pasta 30 | -------------------------------------------------------------------------------- /bindings/python/src/AST/PragmaCommentDecl.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023 Trail of Bits, Inc. 3 | */ 4 | 5 | // This file is auto-generated. 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | #include "../Bindings.h" 16 | 17 | namespace pasta { 18 | namespace nb = nanobind; 19 | 20 | void RegisterPragmaCommentDecl(nb::module_ &m) { 21 | nb::class_(m, "PragmaCommentDecl") 22 | .def_prop_ro("argument", &PragmaCommentDecl::Argument) 23 | .def_prop_ro("comment_kind", &PragmaCommentDecl::CommentKind); 24 | } 25 | } // namespace pasta 26 | -------------------------------------------------------------------------------- /bindings/python/src/AST/PragmaDetectMismatchDecl.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023 Trail of Bits, Inc. 3 | */ 4 | 5 | // This file is auto-generated. 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | #include "../Bindings.h" 16 | 17 | namespace pasta { 18 | namespace nb = nanobind; 19 | 20 | void RegisterPragmaDetectMismatchDecl(nb::module_ &m) { 21 | nb::class_(m, "PragmaDetectMismatchDecl") 22 | .def_prop_ro("name", &PragmaDetectMismatchDecl::Name) 23 | .def_prop_ro("value", &PragmaDetectMismatchDecl::Value); 24 | } 25 | } // namespace pasta 26 | -------------------------------------------------------------------------------- /bindings/python/src/AST/Ptr32Attr.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | 16 | #include "../Bindings.h" 17 | 18 | namespace pasta { 19 | namespace nb = nanobind; 20 | 21 | void RegisterPtr32Attr(nb::module_ &m) { 22 | nb::class_(m, "Ptr32Attr") 23 | .def("__hash__", [](const Ptr32Attr &attr) { return reinterpret_cast(attr.RawAttr()); }) 24 | .def("__eq__", [](const Attr &a, const Attr &b) { return a.RawAttr() == b.RawAttr(); }) 25 | .def("__ne__", [](const Attr &a, const Attr &b) { return a.RawAttr() != b.RawAttr(); }) 26 | .def_prop_ro("spelling", &Ptr32Attr::Spelling); 27 | } 28 | } // namespace pasta 29 | -------------------------------------------------------------------------------- /bindings/python/src/AST/Ptr64Attr.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | 16 | #include "../Bindings.h" 17 | 18 | namespace pasta { 19 | namespace nb = nanobind; 20 | 21 | void RegisterPtr64Attr(nb::module_ &m) { 22 | nb::class_(m, "Ptr64Attr") 23 | .def("__hash__", [](const Ptr64Attr &attr) { return reinterpret_cast(attr.RawAttr()); }) 24 | .def("__eq__", [](const Attr &a, const Attr &b) { return a.RawAttr() == b.RawAttr(); }) 25 | .def("__ne__", [](const Attr &a, const Attr &b) { return a.RawAttr() != b.RawAttr(); }) 26 | .def_prop_ro("spelling", &Ptr64Attr::Spelling); 27 | } 28 | } // namespace pasta 29 | -------------------------------------------------------------------------------- /bindings/python/src/AST/PureAttr.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | 16 | #include "../Bindings.h" 17 | 18 | namespace pasta { 19 | namespace nb = nanobind; 20 | 21 | void RegisterPureAttr(nb::module_ &m) { 22 | nb::class_(m, "PureAttr") 23 | .def("__hash__", [](const PureAttr &attr) { return reinterpret_cast(attr.RawAttr()); }) 24 | .def("__eq__", [](const Attr &a, const Attr &b) { return a.RawAttr() == b.RawAttr(); }) 25 | .def("__ne__", [](const Attr &a, const Attr &b) { return a.RawAttr() != b.RawAttr(); }) 26 | .def_prop_ro("spelling", &PureAttr::Spelling); 27 | } 28 | } // namespace pasta 29 | -------------------------------------------------------------------------------- /bindings/python/src/AST/RValueReferenceType.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterRValueReferenceType(nb::module_ &m) { 24 | nb::class_(m, "RValueReferenceType") 25 | .def_prop_ro("desugar", &RValueReferenceType::Desugar) 26 | .def_prop_ro("is_sugared", &RValueReferenceType::IsSugared); 27 | } 28 | } // namespace pasta 29 | -------------------------------------------------------------------------------- /bindings/python/src/AST/RecordType.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterRecordType(nb::module_ &m) { 24 | nb::class_(m, "RecordType") 25 | .def_prop_ro("desugar", &RecordType::Desugar) 26 | .def_prop_ro("declaration", &RecordType::Declaration) 27 | .def_prop_ro("has_const_fields", &RecordType::HasConstFields) 28 | .def_prop_ro("is_sugared", &RecordType::IsSugared); 29 | } 30 | } // namespace pasta 31 | -------------------------------------------------------------------------------- /bindings/python/src/AST/RecoveryExpr.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterRecoveryExpr(nb::module_ &m) { 24 | nb::class_(m, "RecoveryExpr") 25 | .def_prop_ro("begin_token", &RecoveryExpr::BeginToken) 26 | .def_prop_ro("end_token", &RecoveryExpr::EndToken) 27 | .def_prop_ro("sub_expressions", &RecoveryExpr::SubExpressions); 28 | } 29 | } // namespace pasta 30 | -------------------------------------------------------------------------------- /bindings/python/src/AST/RedeclarableTemplateDecl.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023 Trail of Bits, Inc. 3 | */ 4 | 5 | // This file is auto-generated. 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | #include "../Bindings.h" 16 | 17 | namespace pasta { 18 | namespace nb = nanobind; 19 | 20 | void RegisterRedeclarableTemplateDecl(nb::module_ &m) { 21 | nb::class_(m, "RedeclarableTemplateDecl") 22 | .def_prop_ro("canonical_declaration", &RedeclarableTemplateDecl::CanonicalDeclaration) 23 | .def_prop_ro("instantiated_from_member_template", &RedeclarableTemplateDecl::InstantiatedFromMemberTemplate) 24 | .def_prop_ro("is_member_specialization", &RedeclarableTemplateDecl::IsMemberSpecialization); 25 | } 26 | } // namespace pasta 27 | -------------------------------------------------------------------------------- /bindings/python/src/AST/RequiresExprBodyDecl.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023 Trail of Bits, Inc. 3 | */ 4 | 5 | // This file is auto-generated. 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | #include "../Bindings.h" 16 | 17 | namespace pasta { 18 | namespace nb = nanobind; 19 | 20 | void RegisterRequiresExprBodyDecl(nb::module_ &m) { 21 | nb::class_(m, "RequiresExprBodyDecl"); 22 | } 23 | } // namespace pasta 24 | -------------------------------------------------------------------------------- /bindings/python/src/AST/SEHLeaveStmt.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterSEHLeaveStmt(nb::module_ &m) { 24 | nb::class_(m, "SEHLeaveStmt") 25 | .def_prop_ro("children", &SEHLeaveStmt::Children) 26 | .def_prop_ro("begin_token", &SEHLeaveStmt::BeginToken) 27 | .def_prop_ro("end_token", &SEHLeaveStmt::EndToken) 28 | .def_prop_ro("leave_token", &SEHLeaveStmt::LeaveToken); 29 | } 30 | } // namespace pasta 31 | -------------------------------------------------------------------------------- /bindings/python/src/AST/SPtrAttr.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | 16 | #include "../Bindings.h" 17 | 18 | namespace pasta { 19 | namespace nb = nanobind; 20 | 21 | void RegisterSPtrAttr(nb::module_ &m) { 22 | nb::class_(m, "SPtrAttr") 23 | .def("__hash__", [](const SPtrAttr &attr) { return reinterpret_cast(attr.RawAttr()); }) 24 | .def("__eq__", [](const Attr &a, const Attr &b) { return a.RawAttr() == b.RawAttr(); }) 25 | .def("__ne__", [](const Attr &a, const Attr &b) { return a.RawAttr() != b.RawAttr(); }) 26 | .def_prop_ro("spelling", &SPtrAttr::Spelling); 27 | } 28 | } // namespace pasta 29 | -------------------------------------------------------------------------------- /bindings/python/src/AST/StaticAssertDecl.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023 Trail of Bits, Inc. 3 | */ 4 | 5 | // This file is auto-generated. 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | #include "../Bindings.h" 16 | 17 | namespace pasta { 18 | namespace nb = nanobind; 19 | 20 | void RegisterStaticAssertDecl(nb::module_ &m) { 21 | nb::class_(m, "StaticAssertDecl") 22 | .def_prop_ro("assert_expression", &StaticAssertDecl::AssertExpression) 23 | .def_prop_ro("message", &StaticAssertDecl::Message) 24 | .def_prop_ro("r_paren_token", &StaticAssertDecl::RParenToken) 25 | .def_prop_ro("is_failed", &StaticAssertDecl::IsFailed); 26 | } 27 | } // namespace pasta 28 | -------------------------------------------------------------------------------- /bindings/python/src/AST/StmtAttr.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | 16 | #include "../Bindings.h" 17 | 18 | namespace pasta { 19 | namespace nb = nanobind; 20 | 21 | void RegisterStmtAttr(nb::module_ &m) { 22 | nb::class_(m, "StmtAttr") 23 | .def("__hash__", [](const StmtAttr &attr) { return reinterpret_cast(attr.RawAttr()); }) 24 | .def("__eq__", [](const Attr &a, const Attr &b) { return a.RawAttr() == b.RawAttr(); }) 25 | .def("__ne__", [](const Attr &a, const Attr &b) { return a.RawAttr() != b.RawAttr(); }); 26 | } 27 | } // namespace pasta 28 | -------------------------------------------------------------------------------- /bindings/python/src/AST/TagType.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterTagType(nb::module_ &m) { 24 | nb::class_(m, "TagType") 25 | .def_prop_ro("declaration", &TagType::Declaration) 26 | .def_prop_ro("is_being_defined", &TagType::IsBeingDefined); 27 | } 28 | } // namespace pasta 29 | -------------------------------------------------------------------------------- /bindings/python/src/AST/TemplateDecl.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023 Trail of Bits, Inc. 3 | */ 4 | 5 | // This file is auto-generated. 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | #include "../Bindings.h" 16 | 17 | namespace pasta { 18 | namespace nb = nanobind; 19 | 20 | void RegisterTemplateDecl(nb::module_ &m) { 21 | nb::class_(m, "TemplateDecl") 22 | .def_prop_ro("template_parameters", &TemplateDecl::TemplateParameters) 23 | .def_prop_ro("templated_declaration", &TemplateDecl::TemplatedDeclaration) 24 | .def_prop_ro("has_associated_constraints", &TemplateDecl::HasAssociatedConstraints) 25 | .def_prop_ro("is_type_alias", &TemplateDecl::IsTypeAlias); 26 | } 27 | } // namespace pasta 28 | -------------------------------------------------------------------------------- /bindings/python/src/AST/TemplateParamObjectDecl.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023 Trail of Bits, Inc. 3 | */ 4 | 5 | // This file is auto-generated. 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | #include "../Bindings.h" 16 | 17 | namespace pasta { 18 | namespace nb = nanobind; 19 | 20 | void RegisterTemplateParamObjectDecl(nb::module_ &m) { 21 | nb::class_(m, "TemplateParamObjectDecl") 22 | .def_prop_ro("canonical_declaration", &TemplateParamObjectDecl::CanonicalDeclaration); 23 | } 24 | } // namespace pasta 25 | -------------------------------------------------------------------------------- /bindings/python/src/AST/ThreadAttr.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | 16 | #include "../Bindings.h" 17 | 18 | namespace pasta { 19 | namespace nb = nanobind; 20 | 21 | void RegisterThreadAttr(nb::module_ &m) { 22 | nb::class_(m, "ThreadAttr") 23 | .def("__hash__", [](const ThreadAttr &attr) { return reinterpret_cast(attr.RawAttr()); }) 24 | .def("__eq__", [](const Attr &a, const Attr &b) { return a.RawAttr() == b.RawAttr(); }) 25 | .def("__ne__", [](const Attr &a, const Attr &b) { return a.RawAttr() != b.RawAttr(); }) 26 | .def_prop_ro("spelling", &ThreadAttr::Spelling); 27 | } 28 | } // namespace pasta 29 | -------------------------------------------------------------------------------- /bindings/python/src/AST/TopLevelStmtDecl.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023 Trail of Bits, Inc. 3 | */ 4 | 5 | // This file is auto-generated. 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | #include "../Bindings.h" 16 | 17 | namespace pasta { 18 | namespace nb = nanobind; 19 | 20 | void RegisterTopLevelStmtDecl(nb::module_ &m) { 21 | nb::class_(m, "TopLevelStmtDecl") 22 | .def_prop_ro("statement", &TopLevelStmtDecl::Statement) 23 | .def_prop_ro("is_semi_missing", &TopLevelStmtDecl::IsSemiMissing); 24 | } 25 | } // namespace pasta 26 | -------------------------------------------------------------------------------- /bindings/python/src/AST/TranslationUnitDecl.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023 Trail of Bits, Inc. 3 | */ 4 | 5 | // This file is auto-generated. 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | #include "../Bindings.h" 16 | 17 | namespace pasta { 18 | namespace nb = nanobind; 19 | 20 | void RegisterTranslationUnitDecl(nb::module_ &m) { 21 | nb::class_(m, "TranslationUnitDecl") 22 | .def_prop_ro("anonymous_namespace", &TranslationUnitDecl::AnonymousNamespace); 23 | } 24 | } // namespace pasta 25 | -------------------------------------------------------------------------------- /bindings/python/src/AST/TypeAliasDecl.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023 Trail of Bits, Inc. 3 | */ 4 | 5 | // This file is auto-generated. 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | #include "../Bindings.h" 16 | 17 | namespace pasta { 18 | namespace nb = nanobind; 19 | 20 | void RegisterTypeAliasDecl(nb::module_ &m) { 21 | nb::class_(m, "TypeAliasDecl") 22 | .def_prop_ro("described_alias_template", &TypeAliasDecl::DescribedAliasTemplate); 23 | } 24 | } // namespace pasta 25 | -------------------------------------------------------------------------------- /bindings/python/src/AST/TypeAttr.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | 16 | #include "../Bindings.h" 17 | 18 | namespace pasta { 19 | namespace nb = nanobind; 20 | 21 | void RegisterTypeAttr(nb::module_ &m) { 22 | nb::class_(m, "TypeAttr") 23 | .def("__hash__", [](const TypeAttr &attr) { return reinterpret_cast(attr.RawAttr()); }) 24 | .def("__eq__", [](const Attr &a, const Attr &b) { return a.RawAttr() == b.RawAttr(); }) 25 | .def("__ne__", [](const Attr &a, const Attr &b) { return a.RawAttr() != b.RawAttr(); }); 26 | } 27 | } // namespace pasta 28 | -------------------------------------------------------------------------------- /bindings/python/src/AST/TypeDecl.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023 Trail of Bits, Inc. 3 | */ 4 | 5 | // This file is auto-generated. 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | #include "../Bindings.h" 16 | 17 | namespace pasta { 18 | namespace nb = nanobind; 19 | 20 | void RegisterTypeDecl(nb::module_ &m) { 21 | nb::class_(m, "TypeDecl") 22 | .def_prop_ro("begin_token", &TypeDecl::BeginToken) 23 | .def_prop_ro("type_for_declaration", &TypeDecl::TypeForDeclaration); 24 | } 25 | } // namespace pasta 26 | -------------------------------------------------------------------------------- /bindings/python/src/AST/TypeOfExprType.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterTypeOfExprType(nb::module_ &m) { 24 | nb::class_(m, "TypeOfExprType") 25 | .def_prop_ro("desugar", &TypeOfExprType::Desugar) 26 | .def_prop_ro("type_kind", &TypeOfExprType::TypeKind) 27 | .def_prop_ro("underlying_expression", &TypeOfExprType::UnderlyingExpression) 28 | .def_prop_ro("is_sugared", &TypeOfExprType::IsSugared); 29 | } 30 | } // namespace pasta 31 | -------------------------------------------------------------------------------- /bindings/python/src/AST/TypeOfType.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterTypeOfType(nb::module_ &m) { 24 | nb::class_(m, "TypeOfType") 25 | .def_prop_ro("desugar", &TypeOfType::Desugar) 26 | .def_prop_ro("type_kind", &TypeOfType::TypeKind) 27 | .def_prop_ro("unmodified_type", &TypeOfType::UnmodifiedType) 28 | .def_prop_ro("is_sugared", &TypeOfType::IsSugared); 29 | } 30 | } // namespace pasta 31 | -------------------------------------------------------------------------------- /bindings/python/src/AST/TypeWithKeyword.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterTypeWithKeyword(nb::module_ &m) { 24 | nb::class_(m, "TypeWithKeyword") 25 | .def_prop_ro("keyword", &TypeWithKeyword::Keyword); 26 | } 27 | } // namespace pasta 28 | -------------------------------------------------------------------------------- /bindings/python/src/AST/TypedefDecl.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023 Trail of Bits, Inc. 3 | */ 4 | 5 | // This file is auto-generated. 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | #include "../Bindings.h" 16 | 17 | namespace pasta { 18 | namespace nb = nanobind; 19 | 20 | void RegisterTypedefDecl(nb::module_ &m) { 21 | nb::class_(m, "TypedefDecl"); 22 | } 23 | } // namespace pasta 24 | -------------------------------------------------------------------------------- /bindings/python/src/AST/TypedefNameDecl.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023 Trail of Bits, Inc. 3 | */ 4 | 5 | // This file is auto-generated. 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | #include "../Bindings.h" 16 | 17 | namespace pasta { 18 | namespace nb = nanobind; 19 | 20 | void RegisterTypedefNameDecl(nb::module_ &m) { 21 | nb::class_(m, "TypedefNameDecl") 22 | .def_prop_ro("anonymous_declaration_with_typedef_name", &TypedefNameDecl::AnonymousDeclarationWithTypedefName) 23 | .def_prop_ro("canonical_declaration", &TypedefNameDecl::CanonicalDeclaration) 24 | .def_prop_ro("underlying_type", &TypedefNameDecl::UnderlyingType) 25 | .def_prop_ro("is_moded", &TypedefNameDecl::IsModed) 26 | .def_prop_ro("is_transparent_tag", &TypedefNameDecl::IsTransparentTag); 27 | } 28 | } // namespace pasta 29 | -------------------------------------------------------------------------------- /bindings/python/src/AST/TypedefType.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterTypedefType(nb::module_ &m) { 24 | nb::class_(m, "TypedefType") 25 | .def_prop_ro("desugar", &TypedefType::Desugar) 26 | .def_prop_ro("declaration", &TypedefType::Declaration) 27 | .def_prop_ro("is_sugared", &TypedefType::IsSugared) 28 | .def_prop_ro("type_matches_declaration", &TypedefType::TypeMatchesDeclaration); 29 | } 30 | } // namespace pasta 31 | -------------------------------------------------------------------------------- /bindings/python/src/AST/TypoExpr.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterTypoExpr(nb::module_ &m) { 24 | nb::class_(m, "TypoExpr") 25 | .def_prop_ro("children", &TypoExpr::Children) 26 | .def_prop_ro("begin_token", &TypoExpr::BeginToken) 27 | .def_prop_ro("end_token", &TypoExpr::EndToken); 28 | } 29 | } // namespace pasta 30 | -------------------------------------------------------------------------------- /bindings/python/src/AST/UPtrAttr.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | 16 | #include "../Bindings.h" 17 | 18 | namespace pasta { 19 | namespace nb = nanobind; 20 | 21 | void RegisterUPtrAttr(nb::module_ &m) { 22 | nb::class_(m, "UPtrAttr") 23 | .def("__hash__", [](const UPtrAttr &attr) { return reinterpret_cast(attr.RawAttr()); }) 24 | .def("__eq__", [](const Attr &a, const Attr &b) { return a.RawAttr() == b.RawAttr(); }) 25 | .def("__ne__", [](const Attr &a, const Attr &b) { return a.RawAttr() != b.RawAttr(); }) 26 | .def_prop_ro("spelling", &UPtrAttr::Spelling); 27 | } 28 | } // namespace pasta 29 | -------------------------------------------------------------------------------- /bindings/python/src/AST/UnnamedGlobalConstantDecl.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023 Trail of Bits, Inc. 3 | */ 4 | 5 | // This file is auto-generated. 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | #include "../Bindings.h" 16 | 17 | namespace pasta { 18 | namespace nb = nanobind; 19 | 20 | void RegisterUnnamedGlobalConstantDecl(nb::module_ &m) { 21 | nb::class_(m, "UnnamedGlobalConstantDecl"); 22 | } 23 | } // namespace pasta 24 | -------------------------------------------------------------------------------- /bindings/python/src/AST/UnresolvedUsingIfExistsDecl.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023 Trail of Bits, Inc. 3 | */ 4 | 5 | // This file is auto-generated. 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | #include "../Bindings.h" 16 | 17 | namespace pasta { 18 | namespace nb = nanobind; 19 | 20 | void RegisterUnresolvedUsingIfExistsDecl(nb::module_ &m) { 21 | nb::class_(m, "UnresolvedUsingIfExistsDecl"); 22 | } 23 | } // namespace pasta 24 | -------------------------------------------------------------------------------- /bindings/python/src/AST/UnresolvedUsingType.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterUnresolvedUsingType(nb::module_ &m) { 24 | nb::class_(m, "UnresolvedUsingType") 25 | .def_prop_ro("desugar", &UnresolvedUsingType::Desugar) 26 | .def_prop_ro("declaration", &UnresolvedUsingType::Declaration) 27 | .def_prop_ro("is_sugared", &UnresolvedUsingType::IsSugared); 28 | } 29 | } // namespace pasta 30 | -------------------------------------------------------------------------------- /bindings/python/src/AST/UsedAttr.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | 16 | #include "../Bindings.h" 17 | 18 | namespace pasta { 19 | namespace nb = nanobind; 20 | 21 | void RegisterUsedAttr(nb::module_ &m) { 22 | nb::class_(m, "UsedAttr") 23 | .def("__hash__", [](const UsedAttr &attr) { return reinterpret_cast(attr.RawAttr()); }) 24 | .def("__eq__", [](const Attr &a, const Attr &b) { return a.RawAttr() == b.RawAttr(); }) 25 | .def("__ne__", [](const Attr &a, const Attr &b) { return a.RawAttr() != b.RawAttr(); }) 26 | .def_prop_ro("spelling", &UsedAttr::Spelling); 27 | } 28 | } // namespace pasta 29 | -------------------------------------------------------------------------------- /bindings/python/src/AST/UsingDecl.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023 Trail of Bits, Inc. 3 | */ 4 | 5 | // This file is auto-generated. 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | #include "../Bindings.h" 16 | 17 | namespace pasta { 18 | namespace nb = nanobind; 19 | 20 | void RegisterUsingDecl(nb::module_ &m) { 21 | nb::class_(m, "UsingDecl") 22 | .def_prop_ro("canonical_declaration", &UsingDecl::CanonicalDeclaration) 23 | .def_prop_ro("using_token", &UsingDecl::UsingToken) 24 | .def_prop_ro("has_typename", &UsingDecl::HasTypename) 25 | .def_prop_ro("is_access_declaration", &UsingDecl::IsAccessDeclaration); 26 | } 27 | } // namespace pasta 28 | -------------------------------------------------------------------------------- /bindings/python/src/AST/UsingEnumDecl.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023 Trail of Bits, Inc. 3 | */ 4 | 5 | // This file is auto-generated. 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | #include "../Bindings.h" 16 | 17 | namespace pasta { 18 | namespace nb = nanobind; 19 | 20 | void RegisterUsingEnumDecl(nb::module_ &m) { 21 | nb::class_(m, "UsingEnumDecl") 22 | .def_prop_ro("canonical_declaration", &UsingEnumDecl::CanonicalDeclaration) 23 | .def_prop_ro("enum_declaration", &UsingEnumDecl::EnumDeclaration) 24 | .def_prop_ro("enum_token", &UsingEnumDecl::EnumToken) 25 | .def_prop_ro("enum_type", &UsingEnumDecl::EnumType) 26 | .def_prop_ro("using_token", &UsingEnumDecl::UsingToken); 27 | } 28 | } // namespace pasta 29 | -------------------------------------------------------------------------------- /bindings/python/src/AST/UsingPackDecl.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023 Trail of Bits, Inc. 3 | */ 4 | 5 | // This file is auto-generated. 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | #include "../Bindings.h" 16 | 17 | namespace pasta { 18 | namespace nb = nanobind; 19 | 20 | void RegisterUsingPackDecl(nb::module_ &m) { 21 | nb::class_(m, "UsingPackDecl") 22 | .def_prop_ro("expansions", &UsingPackDecl::Expansions) 23 | .def_prop_ro("canonical_declaration", &UsingPackDecl::CanonicalDeclaration) 24 | .def_prop_ro("instantiated_from_using_declaration", &UsingPackDecl::InstantiatedFromUsingDeclaration); 25 | } 26 | } // namespace pasta 27 | -------------------------------------------------------------------------------- /bindings/python/src/AST/UsingShadowDecl.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023 Trail of Bits, Inc. 3 | */ 4 | 5 | // This file is auto-generated. 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | #include "../Bindings.h" 16 | 17 | namespace pasta { 18 | namespace nb = nanobind; 19 | 20 | void RegisterUsingShadowDecl(nb::module_ &m) { 21 | nb::class_(m, "UsingShadowDecl") 22 | .def_prop_ro("canonical_declaration", &UsingShadowDecl::CanonicalDeclaration) 23 | .def_prop_ro("introducer", &UsingShadowDecl::Introducer) 24 | .def_prop_ro("next_using_shadow_declaration", &UsingShadowDecl::NextUsingShadowDeclaration) 25 | .def_prop_ro("target_declaration", &UsingShadowDecl::TargetDeclaration); 26 | } 27 | } // namespace pasta 28 | -------------------------------------------------------------------------------- /bindings/python/src/AST/ValueDecl.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023 Trail of Bits, Inc. 3 | */ 4 | 5 | // This file is auto-generated. 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | #include "../Bindings.h" 16 | 17 | namespace pasta { 18 | namespace nb = nanobind; 19 | 20 | void RegisterValueDecl(nb::module_ &m) { 21 | nb::class_(m, "ValueDecl") 22 | .def_prop_ro("potentially_decomposed_variable_declaration", &ValueDecl::PotentiallyDecomposedVariableDeclaration) 23 | .def_prop_ro("type", &ValueDecl::Type) 24 | .def_prop_ro("is_initializer_capture", &ValueDecl::IsInitializerCapture) 25 | .def_prop_ro("is_weak", &ValueDecl::IsWeak); 26 | } 27 | } // namespace pasta 28 | -------------------------------------------------------------------------------- /bindings/python/src/AST/ValueStmt.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "../Bindings.h" 19 | 20 | namespace pasta { 21 | namespace nb = nanobind; 22 | 23 | void RegisterValueStmt(nb::module_ &m) { 24 | nb::class_(m, "ValueStmt") 25 | .def_prop_ro("expression_statement", &ValueStmt::ExpressionStatement); 26 | } 27 | } // namespace pasta 28 | -------------------------------------------------------------------------------- /bindings/python/src/AST/WeakAttr.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // This file is auto-generated. 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | 16 | #include "../Bindings.h" 17 | 18 | namespace pasta { 19 | namespace nb = nanobind; 20 | 21 | void RegisterWeakAttr(nb::module_ &m) { 22 | nb::class_(m, "WeakAttr") 23 | .def("__hash__", [](const WeakAttr &attr) { return reinterpret_cast(attr.RawAttr()); }) 24 | .def("__eq__", [](const Attr &a, const Attr &b) { return a.RawAttr() == b.RawAttr(); }) 25 | .def("__ne__", [](const Attr &a, const Attr &b) { return a.RawAttr() != b.RawAttr(); }) 26 | .def_prop_ro("spelling", &WeakAttr::Spelling); 27 | } 28 | } // namespace pasta 29 | -------------------------------------------------------------------------------- /bindings/python/src/CompileCommand.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | #include 9 | 10 | #include "Bindings.h" 11 | 12 | #include 13 | 14 | namespace pasta { 15 | 16 | namespace nb = nanobind; 17 | void RegisterCompileCommand(nb::module_ &m) { 18 | nb::class_(m, "CompileCommand") 19 | .def_static("create_from_arguments", &CompileCommand::CreateFromArguments) 20 | .def_prop_ro("arguments", &CompileCommand::Arguments) 21 | .def_prop_ro("working_directory", &CompileCommand::WorkingDirectory); 22 | } 23 | } // namespace pasta 24 | -------------------------------------------------------------------------------- /bindings/python/src/FileManager.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | #include 9 | 10 | #include "Bindings.h" 11 | 12 | namespace pasta { 13 | 14 | namespace nb = nanobind; 15 | void RegisterFileManager(nb::module_ &m) { 16 | nb::class_(m, "FileManager") 17 | .def(nb::init>()); 18 | } 19 | } // namespace pasta 20 | -------------------------------------------------------------------------------- /bindings/python/src/Module.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | #include "Bindings.h" 9 | 10 | #include 11 | 12 | namespace pasta { 13 | void RegisterAllAST(nanobind::module_&); 14 | }; 15 | 16 | NB_MODULE(pypasta, m) { 17 | static pasta::InitPasta initPasta; 18 | pasta::RegisterArgumentVector(m); 19 | pasta::RegisterCompileCommand(m); 20 | pasta::RegisterFileSystem(m); 21 | pasta::RegisterFileManager(m); 22 | pasta::RegisterToken(m); 23 | pasta::RegisterMacro(m); 24 | pasta::RegisterPrinter(m); 25 | pasta::RegisterCompileJob(m); 26 | pasta::RegisterCompiler(m); 27 | pasta::RegisterAST(m); 28 | pasta::RegisterAllAST(m); 29 | } 30 | -------------------------------------------------------------------------------- /cmake/ccache.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2018, Trail of Bits, Inc. 3 | # 4 | # This source code is licensed in accordance with the terms specified in 5 | # the LICENSE file found in the root directory of this source tree. 6 | # 7 | 8 | if(PLATFORM_LINUX OR PLATFORM_MACOS) 9 | find_program(ccache_executable "ccache") 10 | if(NOT ccache_executable STREQUAL "ccache_executable-NOTFOUND") 11 | message(STATUS "${PROJECT_NAME}: Enabling ccache support (${ccache_executable})") 12 | 13 | set(CMAKE_CXX_COMPILER_LAUNCHER "${ccache_executable}" CACHE FILEPATH "ccache") 14 | set(CMAKE_C_COMPILER_LAUNCHER "${ccache_executable}" CACHE FILEPATH "ccache") 15 | 16 | else() 17 | message(STATUS "${PROJECT_NAME}: No ccache executable found") 18 | endif() 19 | endif() 20 | -------------------------------------------------------------------------------- /include/pasta/AST/DeclTail.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2022, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | #pragma once 9 | 10 | namespace std { 11 | template <> 12 | struct hash<::pasta::Decl> { 13 | public: 14 | using Hasher = std::hash; 15 | static constexpr Hasher kHasher{}; 16 | 17 | inline auto operator()( 18 | const ::pasta::Decl &decl) const noexcept { 19 | return kHasher(decl.RawDecl()); 20 | } 21 | }; 22 | #ifdef PASTA_FOR_EACH_DECL_IMPL 23 | #define PASTA_DEFINE_DECL_HASH(name) \ 24 | template <> \ 25 | struct hash<::pasta::name ## Decl> : public hash<::pasta::Decl> {}; 26 | 27 | PASTA_FOR_EACH_DECL_IMPL(PASTA_DEFINE_DECL_HASH, PASTA_IGNORE_ABSTRACT) 28 | #undef PASTA_DEFINE_DECL_HASH 29 | #endif 30 | 31 | } // namespace std 32 | -------------------------------------------------------------------------------- /include/pasta/Util/Error.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | #pragma once 9 | 10 | #include 11 | 12 | namespace pasta { 13 | 14 | void ClearLastError(void); 15 | 16 | std::error_code GetLastError(void); 17 | 18 | } // namespace pasta 19 | -------------------------------------------------------------------------------- /lib/AST/Builder.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | #include "Builder.h" 9 | 10 | #include 11 | #include 12 | 13 | namespace pasta { 14 | 15 | #ifndef PASTA_IN_BOOTSTRAP 16 | Type TypeBuilder::Build(std::shared_ptr ast_, clang::QualType type) { 17 | if (auto type_ptr = type.getTypePtrOrNull(); 18 | 4095ul < reinterpret_cast(type_ptr)) { 19 | assert(ast_.get() != nullptr); 20 | return Type( 21 | std::move(ast_), type_ptr, 22 | static_cast(type_ptr->getTypeClass()), 23 | type.getQualifiers().getAsOpaqueValue()); 24 | } 25 | assert(false && "`type` is a null type."); 26 | abort(); 27 | } 28 | #endif 29 | 30 | } // namespace pasta 31 | -------------------------------------------------------------------------------- /lib/AST/DeclBootstrap.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | #ifdef PASTA_IN_BOOTSTRAP 9 | 10 | #include 11 | 12 | namespace pasta { 13 | 14 | Decl::Decl(std::shared_ptr ast_, const ::clang::Decl *decl_) 15 | : Decl(std::move(ast_), decl_, static_cast(0u)) {} 16 | 17 | std::string_view Decl::KindName(void) const noexcept { 18 | return std::string_view(""); 19 | } 20 | 21 | } // namespace pasta 22 | 23 | #endif // PASTA_IN_BOOTSTRAP 24 | -------------------------------------------------------------------------------- /lib/AST/StmtBootstrap.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | #ifdef PASTA_IN_BOOTSTRAP 9 | 10 | #include 11 | 12 | namespace pasta { 13 | 14 | Stmt::Stmt(std::shared_ptr ast_, const ::clang::Stmt *stmt_) 15 | : Stmt(std::move(ast_), stmt_, static_cast(0u)) {} 16 | 17 | std::string_view Stmt::KindName(void) const noexcept { 18 | return std::string_view(""); 19 | } 20 | 21 | } // namespace pasta 22 | 23 | #endif // PASTA_IN_BOOTSTRAP 24 | -------------------------------------------------------------------------------- /lib/AST/TypeBootstrap.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | #ifdef PASTA_IN_BOOTSTRAP 9 | 10 | #include 11 | 12 | namespace pasta { 13 | 14 | Type::Type(std::shared_ptr ast_, const ::clang::Type *type_) 15 | : Type(std::move(ast_), type_, static_cast(0u)) {} 16 | 17 | std::string_view Type::KindName(void) const noexcept { 18 | return std::string_view(""); 19 | } 20 | 21 | } // namespace pasta 22 | 23 | #endif // PASTA_IN_BOOTSTRAP 24 | -------------------------------------------------------------------------------- /lib/Compile/BuiltinsPPC.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | // Derived from looking at AppleClang in IDA Pro. 9 | TARGET_BUILTIN(__builtin_altivec_vec_replace_elt, "V4UiV4UiUiIi", "~t", "") 10 | TARGET_BUILTIN(__builtin_altivec_vec_replace_unaligned, "V4UiV4UiUiIi", "~t", "") 11 | 12 | #undef TARGET_BUILTIN 13 | -------------------------------------------------------------------------------- /lib/Compile/Command.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | #pragma once 9 | 10 | #include 11 | #include 12 | 13 | namespace pasta { 14 | 15 | class CompileCommandImpl 16 | : public std::enable_shared_from_this { 17 | public: 18 | inline CompileCommandImpl(ArgumentVector argv_, 19 | std::filesystem::path working_dir_) 20 | : argv(std::move(argv_)), 21 | working_dir(std::move(working_dir_)) {} 22 | 23 | // Arguments of the frontend compile command. 24 | const ArgumentVector argv; 25 | 26 | // Directory in which this command should execute. 27 | const std::filesystem::path working_dir; 28 | }; 29 | 30 | } // namespace pasta 31 | -------------------------------------------------------------------------------- /lib/Util/Error.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021, Trail of Bits, Inc. 3 | * 4 | * This source code is licensed in accordance with the terms specified in 5 | * the LICENSE file found in the root directory of this source tree. 6 | */ 7 | 8 | #include 9 | 10 | #if defined(WIN32) || defined(_WIN32) 11 | # define WIN32_LEAN_AND_MEAN 12 | # include 13 | # include 14 | #endif 15 | 16 | namespace pasta { 17 | 18 | void ClearLastError(void) { 19 | #ifdef _WIN32 20 | ::SetLastError(0); 21 | #else 22 | errno = 0; 23 | #endif 24 | } 25 | 26 | std::error_code GetLastError(void) { 27 | #ifdef _WIN32 28 | return std::error_code(::GetLastError(), std::system_category()); 29 | #else 30 | return std::error_code(errno, std::generic_category()); 31 | #endif 32 | } 33 | 34 | } // namespace pasta 35 | -------------------------------------------------------------------------------- /pastaConfig.cmake.in: -------------------------------------------------------------------------------- 1 | @PACKAGE_INIT@ 2 | 3 | include(CMakeFindDependencyMacro) 4 | list(PREPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}") 5 | 6 | include("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@Targets.cmake") 7 | check_required_components("@PROJECT_NAME@") 8 | 9 | find_dependency(Filesystem) 10 | find_dependency(LLVM) 11 | find_dependency(Clang) 12 | 13 | if(NOT DEFINED PASTA_FIND_QUIETLY) 14 | message(STATUS "Found PASTA: ${CMAKE_CURRENT_LIST_DIR}") 15 | endif() 16 | -------------------------------------------------------------------------------- /scripts/convert-to-embeddable-string: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # 3 | # Copyright (c) 2020, Trail of Bits, Inc. 4 | # 5 | # This source code is licensed in accordance with the terms specified in 6 | # the LICENSE file found in the root directory of this source tree. 7 | # 8 | 9 | import sys 10 | 11 | def main(argv): 12 | if len(argv) != 2: 13 | return 1 14 | 15 | new_lines = [] 16 | with open(argv[1], "r") as lines: 17 | for line in lines: 18 | wrapped_line = line.rstrip(" \t\r\n").replace("\"", "\\\"") 19 | new_lines.append("\"{}\\n\"".format(wrapped_line)) 20 | 21 | print("\n".join(new_lines)) 22 | return 0 23 | 24 | if __name__ == "__main__": 25 | exit(main(sys.argv)) 26 | -------------------------------------------------------------------------------- /scripts/render.js: -------------------------------------------------------------------------------- 1 | /* Copyright 2022, Trail of Bits, Inc. All rights reserved. */ 2 | 3 | class TranslationUnit { 4 | constructor() { 5 | this.file_contents = {} 6 | this.main_file_id = null; 7 | } 8 | }; 9 | 10 | async function render_translation_unit(obj) { 11 | 12 | const tu = new TranslationUnit; 13 | 14 | for (const file_id in obj.file_decls) { 15 | const source_file = 'sources/source.' + file_id + '.html'; 16 | console.log("Downloading " + source_file); 17 | const response = await fetch(source_file); 18 | tu.file_contents[file_id] = await response.text(); 19 | } 20 | 21 | tu.main_file_id = obj.file; 22 | } 23 | -------------------------------------------------------------------------------- /test/TokenPrintingTests/EmptyArgumentList.cpp: -------------------------------------------------------------------------------- 1 | 2 | // RUN: print-cxx-tokens %s | FileCheck %s 3 | 4 | // CHECK: int 5 | // CHECK: foo 6 | // CHECK: ( 7 | // CHECK: ) 8 | // CHECK: { 9 | // CHECK: return 10 | // CHECK: 1 11 | // CHECK: ; 12 | // CHECK: } 13 | 14 | int foo() { 15 | return 1; 16 | } 17 | -------------------------------------------------------------------------------- /test/TokenPrintingTests/FunctionPtrEmptyParamList.cpp: -------------------------------------------------------------------------------- 1 | 2 | // RUN: print-cxx-tokens %s | FileCheck %s 3 | 4 | // CHECK: int 5 | // CHECK: ( 6 | // CHECK: * 7 | // CHECK: foo 8 | // CHECK: ) 9 | // CHECK: ( 10 | // CHECK: ) 11 | // CHECK: ; 12 | 13 | int (*foo)(); 14 | -------------------------------------------------------------------------------- /test/TokenPrintingTests/FunctionPtrVoidParamList.cpp.todo: -------------------------------------------------------------------------------- 1 | 2 | // RUN: print-cxx-tokens %s | FileCheck %s 3 | 4 | // CHECK: int 5 | // CHECK: ( 6 | // CHECK: * 7 | // CHECK: foo 8 | // CHECK: ) 9 | // CHECK: ( 10 | // CHECK: void 11 | // CHECK: ) 12 | // CHECK: ; 13 | 14 | int (*foo)(void); 15 | -------------------------------------------------------------------------------- /test/TokenPrintingTests/QualifiedTypeConversionOperator.cpp: -------------------------------------------------------------------------------- 1 | 2 | // RUN: print-cxx-tokens %s | FileCheck %s 3 | 4 | // CHECK: struct 5 | // CHECK: foo 6 | // CHECK: { 7 | // CHECK: typedef 8 | // CHECK: int 9 | // CHECK: bar 10 | // CHECK: ; 11 | // CHECK: operator 12 | // CHECK: foo 13 | // CHECK: :: 14 | // CHECK: bar 15 | // CHECK: ( 16 | // CHECK: ) 17 | // CHECK: { 18 | // CHECK: return 19 | // CHECK: 1 20 | // CHECK: ; 21 | // CHECK: } 22 | // CHECK: } 23 | // CHECK: ; 24 | 25 | struct foo { 26 | typedef int bar; 27 | operator foo::bar() { 28 | return 1; 29 | } 30 | }; 31 | -------------------------------------------------------------------------------- /test/TokenPrintingTests/README.md: -------------------------------------------------------------------------------- 1 | # Token printing tests 2 | 3 | These files represent testing for the token printing. The purpose of token 4 | printing tests is to get token printing as close as possible to the original 5 | parsed code, so as to minimize the amount of differences between the two. When 6 | there are a lot of differences, we aren't able to use the provenance information 7 | from the token printer to annotate the parsed tokens. When that happens, a new 8 | test should be added and the printing or token alignment facilities fixed. -------------------------------------------------------------------------------- /test/TokenPrintingTests/TypeConversionOperator.cpp: -------------------------------------------------------------------------------- 1 | 2 | // RUN: print-cxx-tokens %s | FileCheck %s 3 | 4 | // CHECK: struct 5 | // CHECK: foo 6 | // CHECK: { 7 | // CHECK: operator 8 | // CHECK: int 9 | // CHECK: ( 10 | // CHECK: ) 11 | // CHECK: { 12 | // CHECK: return 13 | // CHECK: 1 14 | // CHECK: ; 15 | // CHECK: } 16 | // CHECK: } 17 | // CHECK: ; 18 | 19 | struct foo { 20 | operator int () { 21 | return 1; 22 | } 23 | }; 24 | -------------------------------------------------------------------------------- /test/TokenPrintingTests/UnqualifiedTypeConversionOperator.cpp: -------------------------------------------------------------------------------- 1 | 2 | // RUN: print-cxx-tokens %s | FileCheck %s 3 | 4 | // CHECK: struct 5 | // CHECK: foo 6 | // CHECK: { 7 | // CHECK: typedef 8 | // CHECK: int 9 | // CHECK: bar 10 | // CHECK: ; 11 | // CHECK: operator 12 | // CHECK: bar 13 | // CHECK: ( 14 | // CHECK: ) 15 | // CHECK: { 16 | // CHECK: return 17 | // CHECK: 1 18 | // CHECK: ; 19 | // CHECK: } 20 | // CHECK: } 21 | // CHECK: ; 22 | 23 | struct foo { 24 | typedef int bar; 25 | operator bar() { 26 | return 1; 27 | } 28 | }; 29 | -------------------------------------------------------------------------------- /test/TokenPrintingTests/VariadicArgsLeadingComma.cpp: -------------------------------------------------------------------------------- 1 | 2 | // RUN: print-cxx-tokens %s | FileCheck %s 3 | 4 | // CHECK: int 5 | // CHECK: foo 6 | // CHECK: ( 7 | // CHECK: int 8 | // CHECK: bar 9 | // CHECK: , 10 | // CHECK: ... 11 | // CHECK: ) 12 | // CHECK: { 13 | // CHECK: return 14 | // CHECK: 1 15 | // CHECK: ; 16 | // CHECK: } 17 | 18 | int foo(int bar, ...) { 19 | return 1; 20 | } 21 | -------------------------------------------------------------------------------- /test/TokenPrintingTests/VariadicArgsNoLeadingComma.cpp: -------------------------------------------------------------------------------- 1 | 2 | // RUN: print-cxx-tokens %s | FileCheck %s 3 | 4 | // CHECK: int 5 | // CHECK: foo 6 | // CHECK: ( 7 | // CHECK: int 8 | // CHECK: bar 9 | // CHECK: ... 10 | // CHECK: ) 11 | // CHECK: { 12 | // CHECK: return 13 | // CHECK: 1 14 | // CHECK: ; 15 | // CHECK: } 16 | 17 | int foo(int bar...) { 18 | return 1; 19 | } 20 | -------------------------------------------------------------------------------- /test/TokenPrintingTests/VariadicArgsNoLeadingCommaFuncPtrParam.cpp: -------------------------------------------------------------------------------- 1 | 2 | // RUN: print-cxx-tokens %s | FileCheck %s 3 | 4 | // CHECK: int 5 | // CHECK: foo 6 | // CHECK: ( 7 | // CHECK: int 8 | // CHECK: ( 9 | // CHECK: * 10 | // CHECK: bar 11 | // CHECK: ) 12 | // CHECK: ( 13 | // CHECK: ) 14 | // CHECK: ... 15 | // CHECK: ) 16 | // CHECK: { 17 | // CHECK: return 18 | // CHECK: 1 19 | // CHECK: ; 20 | // CHECK: } 21 | 22 | int foo(int (*bar)()...) { 23 | return 1; 24 | } 25 | -------------------------------------------------------------------------------- /test/TokenPrintingTests/VoidArgumentList.cpp: -------------------------------------------------------------------------------- 1 | 2 | // RUN: print-cxx-tokens %s | FileCheck %s 3 | 4 | // CHECK: int 5 | // CHECK: foo 6 | // CHECK: ( 7 | // CHECK: void 8 | // CHECK: ) 9 | // CHECK: { 10 | // CHECK: return 11 | // CHECK: 1 12 | // CHECK: ; 13 | // CHECK: } 14 | 15 | int foo(void) { 16 | return 1; 17 | } 18 | -------------------------------------------------------------------------------- /vendor/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2023, Trail of Bits, Inc. 3 | # 4 | # This source code is licensed in accordance with the terms specified in 5 | # the LICENSE file found in the root directory of this source tree. 6 | # 7 | 8 | find_package(Git REQUIRED) 9 | 10 | if(PASTA_ENABLE_INSTALL) 11 | set(PASTA_VENDOR_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}") 12 | else() 13 | set(PASTA_VENDOR_INSTALL_DIR "${CMAKE_CURRENT_BINARY_DIR}/install") 14 | execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory "${PASTA_VENDOR_INSTALL_DIR}") 15 | endif() 16 | 17 | add_subdirectory(llvm-project) 18 | 19 | if(PASTA_ENABLE_PY_BINDINGS) 20 | add_subdirectory(nanobind) 21 | endif() 22 | --------------------------------------------------------------------------------