|
CppInterOp
C++ Language Interoperability Layer
|
Namespaces | |
| namespace | detail |
| namespace | Thunks |
Classes | |
| class | Box |
| struct | CurScope__LINE__ |
| struct | ErrorSlice |
| Body of a slice-encoded error: drained diagnostics, producer attribution, refcount. More... | |
| struct | InterpreterInfo |
| struct | InterpreterShutdown |
| RAII guard whose dtor calls llvm_shutdown for the owned-interpreter case. More... | |
| struct | Only_CurScope |
| struct | Only_CurScope< clang::Sema > |
| struct | Only_Types |
| struct | Only_Types< ASTContext > |
| class | StatusError |
| struct | StoredDiagView |
| Owning record for one captured diagnostic. More... | |
| class | StreamCaptureInfo |
| struct | Types__LINE__ |
| struct | VTableOverlay |
| struct | VTableOverlayDeleter |
| struct | VTableOverlayDtorHost |
Typedefs | |
| using | UniqueVTableOverlay = std::unique_ptr< VTableOverlay, VTableOverlayDeleter > |
| using | VTableOverlayDtorSlotFn = void(VTableOverlayDtorHost::*)() |
Functions | |
| void *& | VTableOverlayExtraSlot (void *inst, std::size_t i) |
| Address of the i-th extra-prefix slot of an instance with an overlay installed via MakeVTableOverlay(..., n_extra_prefix_slots = N, ...). | |
| UniqueVTableOverlay | MakeUniqueVTableOverlay (void *inst, DeclRef base, std::initializer_list< std::pair< ConstFuncRef, void * > > overrides, std::size_t n_extra_prefix_slots=0, VTableOverlayDtorHook on_destroy=nullptr, void *cleanup_data=nullptr) |
Owning wrapper over MakeVTableOverlay: each pair maps a virtual method of polymorphic class base to its replacement function pointer. | |
| bool | LoadDispatchAPI (const char *customLibPath=nullptr) |
| Initialize all CppInterOp API from the dynamically loaded library. | |
| void | UnloadDispatchAPI () |
| static void | DefaultProcessCrashHandler (void *) |
| static std::deque< InterpreterInfo > & | GetInterpreters (bool SetCrashHandler=true) |
| static void | RegisterInterpreter (compat::Interpreter *I, bool Owned, std::vector< std::string > ArgvStorage={}) |
| static InterpreterInfo & | getInterpInfo (compat::Interpreter *I=nullptr) |
| static compat::Interpreter & | getInterp (InterpRef I=nullptr) |
| InterpreterInfo * | GetInterpInfo (InterpRef I=nullptr) |
| Resolve an InterpRef to the impl-side struct. | |
| InterpRef | GetInterpreter () |
| void | UseExternalInterpreter (InterpRef I) |
| bool | ActivateInterpreter (InterpRef I) |
| bool | DeleteInterpreter (InterpRef I) |
| static clang::Sema & | getSema () |
| static clang::ASTContext & | getASTContext () |
| static void | ForceCodeGen (Decl *D, compat::Interpreter &I) |
| void | CppInterOpTraceJitCallInvokeImpl (const JitCall *JC, void *result, void **args, std::size_t nargs, void *self) |
| void | CppInterOpTraceJitCallInvokeDestructorImpl (const JitCall *JC, void *object, unsigned long nary, int withFree) |
| void | CppInterOpTraceJitCallInvokeReturnImpl (const JitCall *JC, void *result) |
| std::string | GetVersion () |
| std::string | GetBuildInfo () |
| std::string | Demangle (const std::string &mangled_name) |
| void | EnableDebugOutput (bool value) |
| bool | IsDebugOutputEnabled () |
| static void | InstantiateFunctionDefinition (Decl *D) |
| bool | IsAggregate (ConstDeclRef DRef) |
| bool | IsNamespace (ConstDeclRef DRef) |
| bool | IsClass (ConstDeclRef DRef) |
| bool | IsFunction (ConstDeclRef DRef) |
| bool | IsFunctionPointerType (ConstTypeRef TyRef) |
| bool | IsClassPolymorphic (ConstDeclRef DRef) |
| static SourceLocation | GetValidSLoc (Sema &semaRef) |
| bool | IsComplete (ConstDeclRef DRef) |
| size_t | SizeOf (ConstDeclRef DRef) |
| bool | IsBuiltin (ConstTypeRef TyRef) |
| bool | IsTemplate (ConstDeclRef DRef) |
| bool | IsTemplateSpecialization (ConstDeclRef DRef) |
| bool | IsTypedefed (ConstDeclRef DRef) |
| bool | IsAbstract (ConstDeclRef DRef) |
| bool | IsEnumScope (ConstDeclRef DRef) |
| bool | IsEnumConstant (ConstDeclRef DRef) |
| bool | IsEnumType (ConstTypeRef TyRef) |
| static bool | isSmartPointer (const RecordType *RT) |
| bool | IsSmartPtrType (ConstTypeRef TyRef) |
| TypeRef | GetIntegerTypeFromEnumScope (ConstDeclRef DRef) |
| TypeRef | GetIntegerTypeFromEnumType (ConstTypeRef enum_type) |
| std::vector< DeclRef > | GetEnumConstants (ConstDeclRef DRef) |
| TypeRef | GetEnumConstantType (ConstDeclRef DRef) |
| size_t | GetEnumConstantValue (ConstDeclRef DRef) |
| size_t | GetSizeOfType (ConstTypeRef TyRef) |
| bool | IsVariable (ConstDeclRef DRef) |
| std::string | GetName (ConstDeclRef DRef) |
| static std::string | GetCompleteNameImpl (ConstDeclRef DRef, bool qualified) |
| std::string | GetCompleteName (ConstDeclRef DRef) |
| std::string | GetQualifiedName (ConstDeclRef DRef) |
| std::string | GetQualifiedCompleteName (ConstDeclRef DRef) |
| std::string | GetDoxygenComment (ConstDeclRef DRef, bool strip_comment_markers) |
| std::vector< DeclRef > | GetUsingNamespaces (ConstDeclRef DRef) |
| DeclRef | GetGlobalScope () |
| static Decl * | GetScopeFromType (QualType QT) |
| DeclRef | GetScopeFromType (ConstTypeRef TyRef) |
| static const clang::Decl * | GetUnderlyingScopeImpl (const clang::Decl *D) |
| DeclRef | GetUnderlyingScope (ConstDeclRef DRef) |
| DeclRef | GetScope (const std::string &name, ConstDeclRef parent) |
| DeclRef | GetScopeFromCompleteName (const std::string &name) |
| DeclRef | GetNamed (const std::string &name, ConstDeclRef parent) |
| DeclRef | GetParentScope (ConstDeclRef DRef) |
| size_t | GetNumBases (ConstDeclRef DRef) |
| DeclRef | GetBaseClass (ConstDeclRef DRef, size_t ibase) |
| bool | IsSubclass (ConstDeclRef derived, ConstDeclRef base) |
| static unsigned | ComputeBaseOffset (const ASTContext &Context, const CXXRecordDecl *DerivedRD, const CXXBasePath &Path) |
| int64_t | GetBaseClassOffset (ConstDeclRef derived, ConstDeclRef base) |
| template<typename DeclType , typename HandleType > | |
| static void | GetClassDecls (ConstDeclRef DRef, std::vector< HandleType > &methods) |
| void | GetClassMethods (ConstDeclRef DRef, std::vector< FuncRef > &methods) |
| void | GetFunctionTemplatedDecls (ConstDeclRef DRef, std::vector< FuncRef > &methods) |
| bool | HasDefaultConstructor (ConstDeclRef DRef) |
| FuncRef | GetDefaultConstructor (compat::Interpreter &interp, DeclRef DRef) |
| FuncRef | GetDefaultConstructor (DeclRef DRef) |
| FuncRef | GetDestructor (ConstDeclRef DRef) |
| void | DumpScope (ConstDeclRef DRef) |
| static DeclarationName | getCXXOperatorDeclName (ASTContext &Ctx, llvm::StringRef name) |
| std::vector< FuncRef > | GetFunctionsUsingName (ConstDeclRef DRef, const std::string &name) |
| TypeRef | GetFunctionReturnType (ConstFuncRef func) |
| bool | IsAllocator (ConstFuncRef Fn) |
| bool | IsDeallocator (ConstFuncRef Fn) |
| bool | IsFunctionProtoType (ConstTypeRef TyRef) |
| static std::optional< AllocType > | AnalyzeAllocType (const clang::FunctionDecl *Fn, std::unordered_map< const clang::FunctionDecl *, std::optional< AllocType > > &visitedFuncs) |
| AllocType | GetAllocType (ConstFuncRef Fn) |
| void | GetFnTypeSignature (ConstTypeRef fn_type, std::vector< TypeRef > &sig) |
| size_t | GetFunctionNumArgs (ConstFuncRef func) |
| size_t | GetFunctionRequiredArgs (ConstFuncRef func) |
| TypeRef | GetFunctionArgType (ConstFuncRef func, size_t iarg) |
| bool | IsTemplateParmType (ConstTypeRef TyRef) |
| std::string | GetFunctionSignature (ConstFuncRef func) |
| bool | IsFunctionDeleted (ConstFuncRef function) |
| bool | IsTemplatedFunction (ConstFuncRef func) |
| bool | ExistsFunctionTemplate (const std::string &name, ConstDeclRef parent) |
| void | LookupConstructors (const std::string &name, ConstDeclRef parent, std::vector< FuncRef > &funcs) |
| bool | GetClassTemplatedMethods (const std::string &name, ConstDeclRef parent, std::vector< FuncRef > &funcs) |
| FuncRef | BestOverloadFunctionMatch (const std::vector< FuncRef > &candidates, const std::vector< TemplateArgInfo > &explicit_types, const std::vector< TemplateArgInfo > &arg_types) |
| bool | CheckMethodAccess (ConstFuncRef method, AccessSpecifier AS) |
| bool | IsMethod (ConstFuncRef method) |
| bool | IsPublicMethod (ConstFuncRef method) |
| bool | IsProtectedMethod (ConstFuncRef method) |
| bool | IsPrivateMethod (ConstFuncRef method) |
| bool | IsConstructor (ConstFuncRef method) |
| bool | IsDestructor (ConstFuncRef method) |
| bool | IsStaticMethod (ConstFuncRef method) |
| bool | IsExplicit (ConstFuncRef method) |
| void * | GetFunctionAddress (const char *mangled_name) |
| static void * | GetFunctionAddress (const FunctionDecl *FD) |
| void * | GetFunctionAddress (FuncRef method) |
| bool | IsVirtualMethod (ConstFuncRef method) |
| static int | virtualMethodSlot (ConstFuncRef method) |
| static int | vtableMethodSlotCount (ConstDeclRef DRef) |
| static bool | hasComplexVTableLayout (const CXXRecordDecl *RD) |
| static VTableOverlayDtorSlotFn | SlotToDtorFn (void *slot) |
| static void * | DtorFnToSlot (VTableOverlayDtorSlotFn fn) |
| static VTableOverlay * | applyVTableOverlay (void *inst, int total_method_slots, const int *slots, void *const *fns, std::size_t n, std::size_t n_extra_prefix_slots) |
| VTableOverlay * | MakeVTableOverlay (void *inst, ConstDeclRef base, const ConstFuncRef *methods, void *const *overlay_fns, std::size_t n_overlays, std::size_t n_extra_prefix_slots, VTableOverlayDtorHook on_destroy, void *cleanup_data) |
| void | DestroyVTableOverlay (VTableOverlay *overlay) |
| void | GetDatamembers (DeclRef DRef, std::vector< DeclRef > &datamembers) |
| void | GetStaticDatamembers (ConstDeclRef DRef, std::vector< DeclRef > &datamembers) |
| void | GetEnumConstantDatamembers (ConstDeclRef DRef, std::vector< DeclRef > &datamembers, bool include_enum_class) |
| DeclRef | LookupDatamember (const std::string &name, ConstDeclRef parent) |
| bool | IsLambdaClass (ConstTypeRef TyRef) |
| TypeRef | GetVariableType (ConstDeclRef var) |
| intptr_t | GetVariableOffset (compat::Interpreter &I, Decl *D, CXXRecordDecl *BaseCXXRD) |
| intptr_t | GetVariableOffset (ConstDeclRef var, ConstDeclRef parent) |
| bool | CheckVariableAccess (ConstDeclRef var, AccessSpecifier AS) |
| bool | IsPublicVariable (ConstDeclRef var) |
| bool | IsProtectedVariable (ConstDeclRef var) |
| bool | IsPrivateVariable (ConstDeclRef var) |
| bool | IsStaticVariable (ConstDeclRef var) |
| bool | IsConstVariable (ConstDeclRef var) |
| bool | IsRecordType (ConstTypeRef TyRef) |
| bool | IsPODType (ConstTypeRef TyRef) |
| bool | IsIntegerType (ConstTypeRef TyRef, Signedness *s) |
| bool | IsFloatingType (ConstTypeRef TyRef) |
| bool | IsSameType (ConstTypeRef type_a, ConstTypeRef type_b) |
| bool | IsPointerType (ConstTypeRef TyRef) |
| bool | IsVoidPointerType (ConstTypeRef TyRef) |
| TypeRef | GetPointeeType (ConstTypeRef TyRef) |
| bool | IsReferenceType (ConstTypeRef TyRef) |
| ValueKind | GetValueKind (ConstTypeRef TyRef) |
| TypeRef | GetPointerType (ConstTypeRef TyRef) |
| TypeRef | GetReferencedType (ConstTypeRef TyRef, bool rvalue) |
| TypeRef | GetNonReferenceType (ConstTypeRef TyRef) |
| TypeRef | GetUnderlyingType (ConstTypeRef TyRef) |
| std::string | GetTypeAsString (ConstTypeRef var) |
| TypeRef | GetCanonicalType (ConstTypeRef TyRef) |
| bool | HasTypeQualifier (ConstTypeRef TyRef, QualKind qual) |
| TypeRef | RemoveTypeQualifier (ConstTypeRef TyRef, QualKind qual) |
| TypeRef | AddTypeQualifier (ConstTypeRef TyRef, QualKind qual) |
| static void | RegisterPerms (llvm::StringMap< QualType > &Map, QualType QT, llvm::SmallVectorImpl< llvm::StringRef > &Words) |
| static void | PopulateBuiltinMap (ASTContext &Context) |
| static QualType | findBuiltinType (llvm::StringRef typeName, ASTContext &Context) |
| static std::optional< QualType > | GetTypeInternal (const Decl *D) |
| TypeRef | GetType (const std::string &name, ConstDeclRef parent) |
| TypeRef | GetComplexType (ConstTypeRef TyRef) |
| TypeRef | GetTypeFromScope (ConstDeclRef DRef) |
| JitCall | MakeFunctionCallable (InterpRef I, ConstFuncRef func) |
| JitCall | MakeFunctionCallable (ConstFuncRef func) |
| static bool | exec (const char *cmd, std::vector< std::string > &outputs) |
| InterpRef | CreateInterpreter (const std::vector< const char * > &Args, const std::vector< const char * > &GpuArgs) |
| InterpreterLanguage | GetLanguage (InterpRef I) |
| InterpreterLanguageStandard | GetLanguageStandard (InterpRef I) |
| void | AddSearchPath (const char *dir, bool isUser, bool prepend) |
| const char * | GetResourceDir () |
| std::string | DetectResourceDir (const char *ClangBinaryName) |
| void | DetectSystemCompilerIncludePaths (std::vector< std::string > &Paths, const char *CompilerName) |
| void | AddIncludePath (const char *dir) |
| void | GetIncludePaths (std::vector< std::string > &IncludePaths, bool withSystem, bool withFlags) |
| int | Declare (compat::Interpreter &I, const char *code, bool silent) |
| int | Declare (const char *code, bool silent) |
| int | Process (const char *code) |
| static Cpp::Box::Kind | classifyByQualType (clang::QualType QT) |
| Box | Evaluate (const char *code) |
| std::string | LookupLibrary (const char *lib_name) |
| bool | LoadLibrary (const char *lib_stem, bool lookup) |
| void | UnloadLibrary (const char *lib_stem) |
| std::string | SearchLibrariesForSymbol (const char *mangled_name, bool search_system) |
| bool | InsertOrReplaceJitSymbol (compat::Interpreter &I, const char *linker_mangled_name, uint64_t address) |
| bool | InsertOrReplaceJitSymbol (const char *linker_mangled_name, uint64_t address) |
| std::string | ObjToString (const char *TyRef, void *obj) |
| static Decl * | InstantiateTemplate (TemplateDecl *TemplateD, TemplateArgumentListInfo &TLI, Sema &S, bool instantiate_body) |
| Decl * | InstantiateTemplate (TemplateDecl *TemplateD, ArrayRef< TemplateArgument > TemplateArgs, Sema &S, bool instantiate_body) |
| DeclRef | InstantiateTemplate (compat::Interpreter &I, DeclRef tmpl, const TemplateArgInfo *template_args, size_t template_args_size, bool instantiate_body) |
| DeclRef | InstantiateTemplate (DeclRef tmpl, const TemplateArgInfo *template_args, size_t template_args_size, bool instantiate_body) |
| DeclRef | InstantiateTemplate (DeclRef tmpl, const std::vector< TemplateArgInfo > &template_args, bool instantiate_body) |
| void | GetClassTemplateArgs (ConstDeclRef templ_instance, std::vector< TemplateArgInfo > &args) |
| void | GetClassTemplateInstantiationArgs (ConstDeclRef templ_instance, std::vector< TemplateArgInfo > &args) |
| FuncRef | InstantiateTemplateFunctionFromString (const char *function_template) |
| void | GetAllCppNames (ConstDeclRef DRef, std::set< std::string > &names) |
| void | GetEnums (ConstDeclRef DRef, std::vector< std::string > &Result) |
| std::vector< long int > | GetDimensions (ConstTypeRef TyRef) |
| bool | IsTypeDerivedFrom (ConstTypeRef derived, ConstTypeRef base) |
| std::string | GetFunctionArgDefault (ConstFuncRef func, size_t param_index) |
| bool | IsConstMethod (ConstFuncRef method) |
| std::string | GetFunctionArgName (ConstFuncRef func, size_t param_index) |
| std::string | GetSpellingFromOperator (Operator Operator) |
| Operator | GetOperatorFromSpelling (const std::string &op) |
| OperatorArity | GetOperatorArity (ConstFuncRef op) |
| void | GetOperator (ConstDeclRef DRef, Operator op, std::vector< FuncRef > &operators, OperatorArity kind) |
| ObjectRef | Allocate (DeclRef DRef, size_t count) |
| void | Deallocate (DeclRef DRef, ObjectRef address, size_t count) |
| ObjectRef | Construct (compat::Interpreter &interp, DeclRef DRef, void *arena, size_t count) |
| ObjectRef | Construct (DeclRef DRef, void *arena, size_t count) |
| bool | Destruct (compat::Interpreter &interp, ObjectRef This, const Decl *Class, bool withFree, size_t nary) |
| bool | Destruct (ObjectRef This, DeclRef DRef, bool withFree, size_t count) |
| static std::stack< StreamCaptureInfo > & | GetRedirectionStack () |
| void | BeginStdStreamCapture (CaptureStreamKind fd_kind) |
| std::string | EndStdStreamCapture () |
| void | CodeComplete (std::vector< std::string > &Results, const char *code, unsigned complete_line, unsigned complete_column) |
| int | Undo (unsigned N) |
| intptr_t | Evaluate (const char *code, bool *HadError) |
| static const StoredDiagView * | AsView (DiagnosticRef D) |
| DiagnosticSeverity | GetDiagnosticSeverity (DiagnosticRef D) |
| const char * | GetDiagnosticMessage (DiagnosticRef D) |
| const char * | GetDiagnosticFile (DiagnosticRef D) |
| unsigned | GetDiagnosticLine (DiagnosticRef D) |
| unsigned | GetDiagnosticColumn (DiagnosticRef D) |
| Status | GetStatus (ErrorRef E) |
| ArrayView< DiagnosticRef > | GetDiagnostics (ErrorRef E) |
| void | RetainErrorRef (ErrorRef E) |
| void | ReleaseErrorRef (ErrorRef E) |
| ErrorSlice * | AllocSlice (InterpreterInfo *Owner) |
| Allocate a fresh slice on the heap, refcount 0. | |
| ErrorRef | makeError (Status S) |
| Build an inline-status ErrorRef (no diagnostics, no payload). | |
| ErrorRef | makeError (InterpreterInfo *II, Status S, std::string Message, const char *Producer, const char *ProducerSig) |
| Build a slice-encoded error carrying a Clang-derived message + the interp's pending diagnostics + producer attribution. | |
| ErrorRef | drainError (InterpreterInfo *II, llvm::Error E, const char *Producer, const char *ProducerSig) |
Drain E into a fresh slice, returning the slice via ErrorRef. | |
| void | InstallDiagConsumer (InterpreterInfo *II) |
| Wire CppInterOp's DiagnosticConsumer into the interpreter's DiagnosticsEngine so parser/sema diagnostics flow into II->StoredDiags and continue forwarding to whatever consumer Clang already had. | |
| void | DrainPendingInto (InterpreterInfo *II, ErrorSlice *S) |
| Drain the consumer's per-interp buffer into a slice on failure. | |
| void | ClearPending (InterpreterInfo *II) |
| unsigned | GetPendingDiagnosticCount (InterpRef I) |
| DiagnosticRef | GetPendingDiagnostic (unsigned Idx, InterpRef I) |
| void | ClearPendingDiagnostics (InterpRef I) |
| void | ResultAbort_ValueOnError (const ErrorRef &) |
| void | ResultAbort_UncheckedOnDtor (const ErrorRef &) |
| template<typename T > | |
| Result< T > | makeResult (InterpreterInfo *II, llvm::Expected< T > E, const char *Producer, const char *ProducerSig) |
| Convert llvm::Expected<T> into Result<T>. | |
| Result< void > | makeResult (InterpreterInfo *II, llvm::Error E, const char *Producer, const char *ProducerSig) |
| template<typename Handle > | |
| Handle | wrap (void *P) |
| template<typename Handle > | |
| Handle | wrap (const void *P) |
| template<typename T > | |
| T * | unwrap (DeclRef H) |
| template<typename T > | |
| T * | unwrap (TypeRef H) |
| template<typename T > | |
| T * | unwrap (FuncRef H) |
| template<typename T > | |
| T * | unwrap (ObjectRef H) |
| template<typename T > | |
| T * | unwrap (InterpRef H) |
| template<typename T > | |
| const T * | unwrap (ConstDeclRef H) |
| template<typename T > | |
| const T * | unwrap (ConstTypeRef H) |
| template<typename T > | |
| const T * | unwrap (ConstFuncRef H) |
Variables | |
| static bool | SkipShutDown = false |
| Set by UseExternalInterpreter to suppress llvm_shutdown at process exit – the client owns LLVM in that case. | |
| constexpr int | kABIPrefixSize = 2 |
| constexpr int | kMinVTableMethodSlots = 2 |
| constexpr int | kDeletingDtorSlot = 1 |
| using Cpp::UniqueVTableOverlay = typedef std::unique_ptr<VTableOverlay, VTableOverlayDeleter> |
Definition at line 69 of file CppInterOp.h.
| using Cpp::VTableOverlayDtorSlotFn = typedef void (VTableOverlayDtorHost::*)() |
Definition at line 2353 of file CppInterOp.cpp.
| bool Cpp::ActivateInterpreter | ( | InterpRef | I | ) |
Definition at line 323 of file CppInterOp.cpp.
References GetInterpreters(), INTEROP_RETURN, and INTEROP_TRACE.
| void Cpp::AddIncludePath | ( | const char * | dir | ) |
Definition at line 4960 of file CppInterOp.cpp.
References CppInternal::Interpreter::AddIncludePath(), getInterp(), INTEROP_TRACE, and INTEROP_VOID_RETURN.
| void Cpp::AddSearchPath | ( | const char * | dir, |
| bool | isUser, | ||
| bool | prepend | ||
| ) |
Definition at line 4918 of file CppInterOp.cpp.
References CppInternal::DynamicLibraryManager::addSearchPath(), CppInternal::Interpreter::getDynamicLibraryManager(), getInterp(), INTEROP_TRACE, and INTEROP_VOID_RETURN.
| TypeRef Cpp::AddTypeQualifier | ( | ConstTypeRef | TyRef, |
| QualKind | qual | ||
| ) |
Definition at line 3061 of file CppInterOp.cpp.
References INTEROP_RETURN, and INTEROP_TRACE.
| ObjectRef Cpp::Allocate | ( | DeclRef | DRef, |
| size_t | count | ||
| ) |
Definition at line 5626 of file CppInterOp.cpp.
References INTEROP_RETURN, INTEROP_TRACE, and SizeOf().
| ErrorSlice * Cpp::AllocSlice | ( | InterpreterInfo * | Owner | ) |
Allocate a fresh slice on the heap, refcount 0.
Caller bumps the refcount on first use (the boundary translator does this when wrapping the slice into a returned ErrorRef).
Definition at line 165 of file ErrorInternal.cpp.
References AllocSlice().
Referenced by AllocSlice(), drainError(), and makeError().
|
static |
Definition at line 1758 of file CppInterOp.cpp.
References visitedFuncs.
Referenced by GetAllocType().
|
static |
Definition at line 2479 of file CppInterOp.cpp.
References kABIPrefixSize, kMinVTableMethodSlots, Cpp::detail::kVTableOverlayPrefixSize, and Cpp::VTableOverlay::ReadVPtr().
Referenced by MakeVTableOverlay().
|
static |
Definition at line 34 of file ErrorInternal.cpp.
Referenced by GetDiagnosticColumn(), GetDiagnosticFile(), GetDiagnosticLine(), GetDiagnosticMessage(), and GetDiagnosticSeverity().
| void Cpp::BeginStdStreamCapture | ( | CaptureStreamKind | fd_kind | ) |
Definition at line 5815 of file CppInterOp.cpp.
References GetRedirectionStack(), INTEROP_TRACE, and INTEROP_VOID_RETURN.
| FuncRef Cpp::BestOverloadFunctionMatch | ( | const std::vector< FuncRef > & | candidates, |
| const std::vector< TemplateArgInfo > & | explicit_types, | ||
| const std::vector< TemplateArgInfo > & | arg_types | ||
| ) |
Definition at line 2014 of file CppInterOp.cpp.
References getInterp(), getSema(), compat::GetTypeFromDecl(), INTEROP_RETURN, and INTEROP_TRACE.
| bool Cpp::CheckMethodAccess | ( | ConstFuncRef | method, |
| AccessSpecifier | AS | ||
| ) |
Definition at line 2118 of file CppInterOp.cpp.
Referenced by IsPrivateMethod(), IsProtectedMethod(), and IsPublicMethod().
| bool Cpp::CheckVariableAccess | ( | ConstDeclRef | var, |
| AccessSpecifier | AS | ||
| ) |
Definition at line 2834 of file CppInterOp.cpp.
Referenced by IsPrivateVariable(), IsProtectedVariable(), and IsPublicVariable().
|
static |
Definition at line 5028 of file CppInterOp.cpp.
References Cpp::Box::K_Bool, Cpp::Box::K_Char_S, Cpp::Box::K_Double, Cpp::Box::K_Float, Cpp::Box::K_Int, Cpp::Box::K_Long, Cpp::Box::K_LongDouble, Cpp::Box::K_LongLong, Cpp::Box::K_PtrOrObj, Cpp::Box::K_SChar, Cpp::Box::K_Short, Cpp::Box::K_UChar, Cpp::Box::K_UInt, Cpp::Box::K_ULong, Cpp::Box::K_ULongLong, and Cpp::Box::K_UShort.
Referenced by Evaluate().
| void Cpp::ClearPending | ( | InterpreterInfo * | II | ) |
Definition at line 330 of file ErrorInternal.cpp.
References ClearPending().
Referenced by ClearPending().
| void Cpp::ClearPendingDiagnostics | ( | InterpRef | I | ) |
Definition at line 345 of file ErrorInternal.cpp.
References ClearPendingDiagnostics(), GetInterpInfo(), and Cpp::InterpreterInfo::StoredDiags.
Referenced by ClearPendingDiagnostics().
| void Cpp::CodeComplete | ( | std::vector< std::string > & | Results, |
| const char * | code, | ||
| unsigned | complete_line, | ||
| unsigned | complete_column | ||
| ) |
Definition at line 5830 of file CppInterOp.cpp.
References compat::codeComplete(), getInterp(), INTEROP_OUT, INTEROP_TRACE, and INTEROP_VOID_RETURN.
|
static |
Definition at line 1301 of file CppInterOp.cpp.
Referenced by GetBaseClassOffset().
| ObjectRef Cpp::Construct | ( | compat::Interpreter & | interp, |
| DeclRef | DRef, | ||
| void * | arena, | ||
| size_t | count | ||
| ) |
Definition at line 5639 of file CppInterOp.cpp.
References GetDefaultConstructor(), HasDefaultConstructor(), IsClass(), IsConstructor(), MakeFunctionCallable(), and result.
Referenced by Construct().
| ObjectRef Cpp::Construct | ( | DeclRef | DRef, |
| void * | arena, | ||
| size_t | count | ||
| ) |
Definition at line 5666 of file CppInterOp.cpp.
References Construct(), getInterp(), INTEROP_RETURN, and INTEROP_TRACE.
| void Cpp::CppInterOpTraceJitCallInvokeDestructorImpl | ( | const JitCall * | JC, |
| void * | object, | ||
| unsigned long | nary, | ||
| int | withFree | ||
| ) |
Definition at line 471 of file CppInterOp.cpp.
References CppInterOp::Tracing::TheTraceInfo.
Referenced by CppInterOp::Tracing::InitTracing().
| void Cpp::CppInterOpTraceJitCallInvokeImpl | ( | const JitCall * | JC, |
| void * | result, | ||
| void ** | args, | ||
| std::size_t | nargs, | ||
| void * | self | ||
| ) |
Definition at line 450 of file CppInterOp.cpp.
References result, and CppInterOp::Tracing::TheTraceInfo.
Referenced by CppInterOp::Tracing::InitTracing().
| void Cpp::CppInterOpTraceJitCallInvokeReturnImpl | ( | const JitCall * | JC, |
| void * | result | ||
| ) |
Definition at line 495 of file CppInterOp.cpp.
References result, and CppInterOp::Tracing::TheTraceInfo.
Referenced by CppInterOp::Tracing::InitTracing().
| InterpRef Cpp::CreateInterpreter | ( | const std::vector< const char * > & | Args, |
| const std::vector< const char * > & | GpuArgs | ||
| ) |
Definition at line 4693 of file CppInterOp.cpp.
References __ci_newtag, __clang_Interpreter_SetValueNoAlloc(), __clang_Interpreter_SetValueWithAlloc(), CppInternal::Interpreter::create(), DetectResourceDir(), exec(), GetInterpreters(), GetLanguage(), GetNamed(), INTEROP_RETURN, INTEROP_TRACE, compat::maybeMangleDeclName(), and RegisterInterpreter().
Referenced by LoadDispatchAPI().
| void Cpp::Deallocate | ( | DeclRef | DRef, |
| ObjectRef | address, | ||
| size_t | count | ||
| ) |
Definition at line 5631 of file CppInterOp.cpp.
References INTEROP_TRACE, INTEROP_VOID_RETURN, and SizeOf().
| int Cpp::Declare | ( | compat::Interpreter & | I, |
| const char * | code, | ||
| bool | silent | ||
| ) |
Definition at line 4992 of file CppInterOp.cpp.
References CppInternal::Interpreter::declare(), CppInternal::Interpreter::getSema(), and result.
Referenced by Declare(), and InstantiateTemplateFunctionFromString().
| int Cpp::Declare | ( | const char * | code, |
| bool | silent | ||
| ) |
Definition at line 5011 of file CppInterOp.cpp.
References Declare(), getInterp(), INTEROP_RETURN, and INTEROP_TRACE.
|
static |
Definition at line 240 of file CppInterOp.cpp.
References GetInterpreters(), CppInterOp::Tracing::TheTraceInfo, and CppInterOp::Tracing::TraceInfo::writeToFile().
Referenced by GetInterpreters().
| bool Cpp::DeleteInterpreter | ( | InterpRef | I | ) |
Definition at line 343 of file CppInterOp.cpp.
References GetInterpreters(), INTEROP_RETURN, and INTEROP_TRACE.
| std::string Cpp::Demangle | ( | const std::string & | mangled_name | ) |
Definition at line 541 of file CppInterOp.cpp.
References INTEROP_RETURN, and INTEROP_TRACE.
| void Cpp::DestroyVTableOverlay | ( | VTableOverlay * | overlay | ) |
Definition at line 2578 of file CppInterOp.cpp.
References INTEROP_TRACE, and INTEROP_VOID_RETURN.
Referenced by Cpp::VTableOverlayDeleter::operator()().
| bool Cpp::Destruct | ( | compat::Interpreter & | interp, |
| ObjectRef | This, | ||
| const Decl * | Class, | ||
| bool | withFree, | ||
| size_t | nary | ||
| ) |
Definition at line 5672 of file CppInterOp.cpp.
Referenced by Destruct().
| bool Cpp::Destruct | ( | ObjectRef | This, |
| DeclRef | DRef, | ||
| bool | withFree, | ||
| size_t | count | ||
| ) |
Definition at line 5682 of file CppInterOp.cpp.
References Destruct(), getInterp(), INTEROP_RETURN, and INTEROP_TRACE.
| std::string Cpp::DetectResourceDir | ( | const char * | ClangBinaryName | ) |
Definition at line 4930 of file CppInterOp.cpp.
References exec(), INTEROP_RETURN, and INTEROP_TRACE.
Referenced by CreateInterpreter().
| void Cpp::DetectSystemCompilerIncludePaths | ( | std::vector< std::string > & | Paths, |
| const char * | CompilerName | ||
| ) |
Definition at line 4948 of file CppInterOp.cpp.
References exec(), INTEROP_OUT, INTEROP_TRACE, and INTEROP_VOID_RETURN.
| ErrorRef Cpp::drainError | ( | InterpreterInfo * | II, |
| llvm::Error | E, | ||
| const char * | Producer, | ||
| const char * | ProducerSig | ||
| ) |
Drain E into a fresh slice, returning the slice via ErrorRef.
Handles StatusError; any other llvm::Error is stringified via llvm::ErrorInfoBase::log into the slice's first diagnostic.
Definition at line 192 of file ErrorInternal.cpp.
References AllocSlice(), Cpp::StatusError::Code, drainError(), DrainPendingInto(), Cpp::StoredDiagView::Message, Cpp::StatusError::Message, and Cpp::StoredDiagView::Sev.
Referenced by drainError(), makeResult(), and makeResult().
| void Cpp::DrainPendingInto | ( | InterpreterInfo * | II, |
| ErrorSlice * | S | ||
| ) |
Drain the consumer's per-interp buffer into a slice on failure.
Success paths just clear via ClearPending – callers don't surface Ok-path warnings today.
Definition at line 324 of file ErrorInternal.cpp.
References DrainPendingInto().
Referenced by drainError(), DrainPendingInto(), and makeError().
|
static |
Definition at line 2365 of file CppInterOp.cpp.
Referenced by MakeVTableOverlay().
| void Cpp::DumpScope | ( | ConstDeclRef | DRef | ) |
Definition at line 1489 of file CppInterOp.cpp.
References INTEROP_TRACE, and INTEROP_VOID_RETURN.
| void Cpp::EnableDebugOutput | ( | bool | value | ) |
Definition at line 556 of file CppInterOp.cpp.
References INTEROP_TRACE, and INTEROP_VOID_RETURN.
| std::string Cpp::EndStdStreamCapture | ( | ) |
Definition at line 5821 of file CppInterOp.cpp.
References Cpp::StreamCaptureInfo::GetCapturedString(), GetRedirectionStack(), INTEROP_RETURN, INTEROP_TRACE, and result.
| Box Cpp::Evaluate | ( | const char * | code | ) |
Definition at line 5073 of file CppInterOp.cpp.
References classifyByQualType(), CPP_BOX_BUILTIN_TYPES, CPPINTEROP_MSAN_UNPOISON_VALUE, CppInternal::Interpreter::evaluate(), getInterp(), INTEROP_RETURN, INTEROP_TRACE, Cpp::Box::K_Char_U, Cpp::Box::K_PtrOrObj, Cpp::Box::K_Unspecified, Cpp::Box::K_Void, and compat::MakeValueBox().
Referenced by cppinterop_Evaluate().
| intptr_t Cpp::Evaluate | ( | const char * | code, |
| bool * | HadError | ||
| ) |
Definition at line 35 of file CXCppInterOp.cpp.
References CPPINTEROP_MSAN_UNPOISON_VALUE, and GetInterpreter().
|
static |
Definition at line 4665 of file CppInterOp.cpp.
Referenced by CreateInterpreter(), DetectResourceDir(), and DetectSystemCompilerIncludePaths().
| bool Cpp::ExistsFunctionTemplate | ( | const std::string & | name, |
| ConstDeclRef | parent | ||
| ) |
Definition at line 1922 of file CppInterOp.cpp.
References getSema(), INTEROP_RETURN, INTEROP_TRACE, IsTemplatedFunction(), and CppInternal::utils::Lookup::Named().
|
static |
Definition at line 3174 of file CppInterOp.cpp.
References GetInterpreters(), and PopulateBuiltinMap().
Referenced by GetType().
|
static |
Definition at line 369 of file CppInterOp.cpp.
References CppInternal::Interpreter::Execute(), CppInternal::Interpreter::getCI(), CppInternal::Interpreter::getSema(), and CppInternal::Interpreter::Parse().
Referenced by GetFunctionAddress(), and GetVariableOffset().
| void Cpp::GetAllCppNames | ( | ConstDeclRef | DRef, |
| std::set< std::string > & | names | ||
| ) |
Definition at line 5394 of file CppInterOp.cpp.
References getInterp(), INTEROP_OUT, INTEROP_TRACE, and INTEROP_VOID_RETURN.
| AllocType Cpp::GetAllocType | ( | ConstFuncRef | Fn | ) |
Definition at line 1778 of file CppInterOp.cpp.
References AnalyzeAllocType(), INTEROP_RETURN, INTEROP_TRACE, and visitedFuncs.
|
static |
Definition at line 367 of file CppInterOp.cpp.
References getSema().
Referenced by GetBaseClassOffset(), GetClassTemplatedMethods(), GetComplexType(), GetFunctionAddress(), GetFunctionAddress(), GetFunctionSignature(), GetFunctionsUsingName(), GetGlobalScope(), GetPointerType(), GetReferencedType(), GetType(), GetTypeAsString(), IsPODType(), IsSameType(), virtualMethodSlot(), and vtableMethodSlotCount().
| DeclRef Cpp::GetBaseClass | ( | ConstDeclRef | DRef, |
| size_t | ibase | ||
| ) |
Definition at line 1261 of file CppInterOp.cpp.
References INTEROP_RETURN, and INTEROP_TRACE.
Referenced by GetVariableOffset().
| int64_t Cpp::GetBaseClassOffset | ( | ConstDeclRef | derived, |
| ConstDeclRef | base | ||
| ) |
Definition at line 1345 of file CppInterOp.cpp.
References ComputeBaseOffset(), getASTContext(), getSema(), INTEROP_RETURN, and INTEROP_TRACE.
| std::string Cpp::GetBuildInfo | ( | ) |
Definition at line 528 of file CppInterOp.cpp.
References INTEROP_RETURN, and INTEROP_TRACE.
Referenced by CppInterOp::Tracing::WriteBuildContext().
| TypeRef Cpp::GetCanonicalType | ( | ConstTypeRef | TyRef | ) |
Definition at line 3017 of file CppInterOp.cpp.
References INTEROP_RETURN, and INTEROP_TRACE.
|
static |
Definition at line 1382 of file CppInterOp.cpp.
References getInterp(), GetScopeFromType(), getSema(), and compat::GetTypeFromDecl().
| void Cpp::GetClassMethods | ( | ConstDeclRef | DRef, |
| std::vector< FuncRef > & | methods | ||
| ) |
Definition at line 1439 of file CppInterOp.cpp.
References INTEROP_OUT, INTEROP_TRACE, and INTEROP_VOID_RETURN.
| void Cpp::GetClassTemplateArgs | ( | ConstDeclRef | templ_instance, |
| std::vector< TemplateArgInfo > & | args | ||
| ) |
Definition at line 5339 of file CppInterOp.cpp.
References INTEROP_OUT, INTEROP_TRACE, and INTEROP_VOID_RETURN.
| bool Cpp::GetClassTemplatedMethods | ( | const std::string & | name, |
| ConstDeclRef | parent, | ||
| std::vector< FuncRef > & | funcs | ||
| ) |
Definition at line 1963 of file CppInterOp.cpp.
References clang_LookupResult_Found, clang_LookupResult_Found_Overloaded, clang_LookupResult_Not_Found, getASTContext(), getSema(), GetUnderlyingScope(), INTEROP_OUT, INTEROP_RETURN, INTEROP_TRACE, IsTemplatedFunction(), LookupConstructors(), and CppInternal::utils::Lookup::Named().
Referenced by cppinterop_GetClassTemplatedMethods().
| void Cpp::GetClassTemplateInstantiationArgs | ( | ConstDeclRef | templ_instance, |
| std::vector< TemplateArgInfo > & | args | ||
| ) |
Definition at line 5350 of file CppInterOp.cpp.
References INTEROP_OUT, and INTEROP_TRACE.
| std::string Cpp::GetCompleteName | ( | ConstDeclRef | DRef | ) |
Definition at line 933 of file CppInterOp.cpp.
References GetCompleteNameImpl(), INTEROP_RETURN, and INTEROP_TRACE.
|
static |
Definition at line 891 of file CppInterOp.cpp.
References getSema(), and compat::GetTypeFromDecl().
Referenced by GetCompleteName(), and GetQualifiedCompleteName().
| TypeRef Cpp::GetComplexType | ( | ConstTypeRef | TyRef | ) |
Definition at line 3212 of file CppInterOp.cpp.
References getASTContext(), INTEROP_RETURN, and INTEROP_TRACE.
|
static |
Definition at line 1501 of file CppInterOp.cpp.
Referenced by GetFunctionsUsingName().
| void Cpp::GetDatamembers | ( | DeclRef | DRef, |
| std::vector< DeclRef > & | datamembers | ||
| ) |
Definition at line 2584 of file CppInterOp.cpp.
References getSema(), INTEROP_OUT, INTEROP_TRACE, and INTEROP_VOID_RETURN.
| FuncRef Cpp::GetDefaultConstructor | ( | compat::Interpreter & | interp, |
| DeclRef | DRef | ||
| ) |
Definition at line 1462 of file CppInterOp.cpp.
References CppInternal::Interpreter::getCI(), getInterp(), and HasDefaultConstructor().
Referenced by Construct(), and GetDefaultConstructor().
| FuncRef Cpp::GetDefaultConstructor | ( | DeclRef | DRef | ) |
Definition at line 1471 of file CppInterOp.cpp.
References GetDefaultConstructor(), getInterp(), INTEROP_RETURN, and INTEROP_TRACE.
| FuncRef Cpp::GetDestructor | ( | ConstDeclRef | DRef | ) |
Definition at line 1476 of file CppInterOp.cpp.
References getSema(), INTEROP_RETURN, and INTEROP_TRACE.
| unsigned Cpp::GetDiagnosticColumn | ( | DiagnosticRef | D | ) |
Definition at line 62 of file ErrorInternal.cpp.
References AsView().
| const char * Cpp::GetDiagnosticFile | ( | DiagnosticRef | D | ) |
Definition at line 50 of file ErrorInternal.cpp.
References AsView().
| unsigned Cpp::GetDiagnosticLine | ( | DiagnosticRef | D | ) |
Definition at line 56 of file ErrorInternal.cpp.
References AsView().
| const char * Cpp::GetDiagnosticMessage | ( | DiagnosticRef | D | ) |
Definition at line 44 of file ErrorInternal.cpp.
References AsView().
| ArrayView< DiagnosticRef > Cpp::GetDiagnostics | ( | ErrorRef | E | ) |
Definition at line 89 of file ErrorInternal.cpp.
| DiagnosticSeverity Cpp::GetDiagnosticSeverity | ( | DiagnosticRef | D | ) |
Definition at line 38 of file ErrorInternal.cpp.
References AsView(), and Cpp::StoredDiagView::Sev.
| std::vector< long int > Cpp::GetDimensions | ( | ConstTypeRef | TyRef | ) |
Definition at line 5450 of file CppInterOp.cpp.
References INTEROP_RETURN, and INTEROP_TRACE.
| std::string Cpp::GetDoxygenComment | ( | ConstDeclRef | DRef, |
| bool | strip_comment_markers | ||
| ) |
Definition at line 957 of file CppInterOp.cpp.
References INTEROP_RETURN, and INTEROP_TRACE.
| void Cpp::GetEnumConstantDatamembers | ( | ConstDeclRef | DRef, |
| std::vector< DeclRef > & | datamembers, | ||
| bool | include_enum_class | ||
| ) |
Definition at line 2634 of file CppInterOp.cpp.
References INTEROP_OUT, INTEROP_TRACE, and INTEROP_VOID_RETURN.
| std::vector< DeclRef > Cpp::GetEnumConstants | ( | ConstDeclRef | DRef | ) |
Definition at line 820 of file CppInterOp.cpp.
References INTEROP_RETURN, and INTEROP_TRACE.
| TypeRef Cpp::GetEnumConstantType | ( | ConstDeclRef | DRef | ) |
Definition at line 836 of file CppInterOp.cpp.
References INTEROP_RETURN, and INTEROP_TRACE.
| size_t Cpp::GetEnumConstantValue | ( | ConstDeclRef | DRef | ) |
Definition at line 848 of file CppInterOp.cpp.
References INTEROP_RETURN, and INTEROP_TRACE.
| void Cpp::GetEnums | ( | ConstDeclRef | DRef, |
| std::vector< std::string > & | Result | ||
| ) |
Definition at line 5424 of file CppInterOp.cpp.
References INTEROP_OUT, INTEROP_TRACE, and INTEROP_VOID_RETURN.
| void Cpp::GetFnTypeSignature | ( | ConstTypeRef | fn_type, |
| std::vector< TypeRef > & | sig | ||
| ) |
Definition at line 1793 of file CppInterOp.cpp.
References INTEROP_OUT, INTEROP_TRACE, and INTEROP_VOID_RETURN.
| void * Cpp::GetFunctionAddress | ( | const char * | mangled_name | ) |
Definition at line 2200 of file CppInterOp.cpp.
References getInterp(), compat::getSymbolAddress(), INTEROP_RETURN, and INTEROP_TRACE.
Referenced by GetFunctionAddress(), and GetFunctionAddress().
|
static |
Definition at line 2212 of file CppInterOp.cpp.
References getASTContext(), and GetFunctionAddress().
| void * Cpp::GetFunctionAddress | ( | FuncRef | method | ) |
Definition at line 2238 of file CppInterOp.cpp.
References ForceCodeGen(), getASTContext(), GetFunctionAddress(), getInterp(), InstantiateFunctionDefinition(), INTEROP_RETURN, and INTEROP_TRACE.
| std::string Cpp::GetFunctionArgDefault | ( | ConstFuncRef | func, |
| size_t | param_index | ||
| ) |
Definition at line 5487 of file CppInterOp.cpp.
References getInterp(), INTEROP_RETURN, and INTEROP_TRACE.
| std::string Cpp::GetFunctionArgName | ( | ConstFuncRef | func, |
| size_t | param_index | ||
| ) |
Definition at line 5539 of file CppInterOp.cpp.
References INTEROP_RETURN, and INTEROP_TRACE.
| TypeRef Cpp::GetFunctionArgType | ( | ConstFuncRef | func, |
| size_t | iarg | ||
| ) |
Definition at line 1835 of file CppInterOp.cpp.
References INTEROP_RETURN, and INTEROP_TRACE.
| size_t Cpp::GetFunctionNumArgs | ( | ConstFuncRef | func | ) |
Definition at line 1810 of file CppInterOp.cpp.
References INTEROP_RETURN, and INTEROP_TRACE.
| size_t Cpp::GetFunctionRequiredArgs | ( | ConstFuncRef | func | ) |
Definition at line 1822 of file CppInterOp.cpp.
References INTEROP_RETURN, and INTEROP_TRACE.
| TypeRef Cpp::GetFunctionReturnType | ( | ConstFuncRef | func | ) |
Definition at line 1558 of file CppInterOp.cpp.
References InstantiateFunctionDefinition(), INTEROP_RETURN, INTEROP_TRACE, IsTemplatedFunction(), and IsTemplateSpecialization().
| std::string Cpp::GetFunctionSignature | ( | ConstFuncRef | func | ) |
Definition at line 1858 of file CppInterOp.cpp.
References getASTContext(), INTEROP_RETURN, and INTEROP_TRACE.
| std::vector< FuncRef > Cpp::GetFunctionsUsingName | ( | ConstDeclRef | DRef, |
| const std::string & | name | ||
| ) |
Definition at line 1519 of file CppInterOp.cpp.
References getASTContext(), getCXXOperatorDeclName(), getSema(), GetUnderlyingScope(), INTEROP_RETURN, INTEROP_TRACE, and CppInternal::utils::Lookup::Named().
| void Cpp::GetFunctionTemplatedDecls | ( | ConstDeclRef | DRef, |
| std::vector< FuncRef > & | methods | ||
| ) |
Definition at line 1445 of file CppInterOp.cpp.
References INTEROP_OUT, INTEROP_TRACE, and INTEROP_VOID_RETURN.
| DeclRef Cpp::GetGlobalScope | ( | ) |
Definition at line 995 of file CppInterOp.cpp.
References getASTContext(), getSema(), INTEROP_RETURN, and INTEROP_TRACE.
Referenced by GetScope().
| void Cpp::GetIncludePaths | ( | std::vector< std::string > & | IncludePaths, |
| bool | withSystem, | ||
| bool | withFlags | ||
| ) |
Definition at line 4966 of file CppInterOp.cpp.
References CppInternal::Interpreter::GetIncludePaths(), getInterp(), INTEROP_OUT, INTEROP_TRACE, and INTEROP_VOID_RETURN.
| TypeRef Cpp::GetIntegerTypeFromEnumScope | ( | ConstDeclRef | DRef | ) |
Definition at line 798 of file CppInterOp.cpp.
References INTEROP_RETURN, and INTEROP_TRACE.
| TypeRef Cpp::GetIntegerTypeFromEnumType | ( | ConstTypeRef | enum_type | ) |
Definition at line 808 of file CppInterOp.cpp.
References INTEROP_RETURN, and INTEROP_TRACE.
|
static |
Definition at line 297 of file CppInterOp.cpp.
References getInterpInfo(), and Cpp::InterpreterInfo::Interpreter.
Referenced by AddIncludePath(), AddSearchPath(), BestOverloadFunctionMatch(), CodeComplete(), Construct(), Declare(), Destruct(), Evaluate(), GetAllCppNames(), Cpp::StreamCaptureInfo::GetCapturedString(), GetClassDecls(), GetDefaultConstructor(), GetDefaultConstructor(), GetFunctionAddress(), GetFunctionAddress(), GetFunctionArgDefault(), GetIncludePaths(), GetLanguage(), GetLanguageStandard(), GetNamed(), GetNumBases(), GetOperator(), GetResourceDir(), getSema(), GetVariableOffset(), GetVariableOffset(), InsertOrReplaceJitSymbol(), InstantiateFunctionDefinition(), InstantiateTemplate(), InstantiateTemplate(), InstantiateTemplate(), IsComplete(), IsTypeDerivedFrom(), LoadLibrary(), LookupLibrary(), MakeFunctionCallable(), ObjToString(), Process(), SearchLibrariesForSymbol(), Cpp::StreamCaptureInfo::StreamCaptureInfo(), Undo(), and UnloadLibrary().
|
static |
Definition at line 285 of file CppInterOp.cpp.
References GetInterpreters().
Referenced by getInterp(), and GetInterpInfo().
| InterpreterInfo * Cpp::GetInterpInfo | ( | InterpRef | I = nullptr | ) |
Resolve an InterpRef to the impl-side struct.
When I is null, returns the active (last-created) interpreter.
Definition at line 303 of file CppInterOp.cpp.
References getInterpInfo().
Referenced by ClearPendingDiagnostics(), GetPendingDiagnostic(), and GetPendingDiagnosticCount().
| InterpRef Cpp::GetInterpreter | ( | ) |
Definition at line 307 of file CppInterOp.cpp.
References GetInterpreters(), INTEROP_RETURN, and INTEROP_TRACE.
Referenced by Evaluate(), and LoadDispatchAPI().
|
static |
Definition at line 204 of file CppInterOp.cpp.
References DefaultProcessCrashHandler(), and CppInterOp::Tracing::InitTracing().
Referenced by ActivateInterpreter(), CreateInterpreter(), DefaultProcessCrashHandler(), DeleteInterpreter(), findBuiltinType(), getInterpInfo(), GetInterpreter(), PopulateBuiltinMap(), and UseExternalInterpreter().
| InterpreterLanguage Cpp::GetLanguage | ( | InterpRef | I | ) |
Definition at line 4884 of file CppInterOp.cpp.
References CppInternal::Interpreter::getCI(), getInterp(), INTEROP_RETURN, and INTEROP_TRACE.
Referenced by CreateInterpreter().
| InterpreterLanguageStandard Cpp::GetLanguageStandard | ( | InterpRef | I | ) |
Definition at line 4904 of file CppInterOp.cpp.
References CppInternal::Interpreter::getCI(), getInterp(), INTEROP_RETURN, and INTEROP_TRACE.
| std::string Cpp::GetName | ( | ConstDeclRef | DRef | ) |
Definition at line 876 of file CppInterOp.cpp.
References INTEROP_RETURN, and INTEROP_TRACE.
Referenced by LookupConstructors().
| DeclRef Cpp::GetNamed | ( | const std::string & | name, |
| ConstDeclRef | parent | ||
| ) |
Definition at line 1185 of file CppInterOp.cpp.
References getInterp(), getSema(), GetUnderlyingScope(), INTEROP_RETURN, INTEROP_TRACE, and CppInternal::utils::Lookup::Named().
Referenced by CreateInterpreter(), GetScope(), GetType(), and InstantiateTemplateFunctionFromString().
| TypeRef Cpp::GetNonReferenceType | ( | ConstTypeRef | TyRef | ) |
Definition at line 2977 of file CppInterOp.cpp.
References INTEROP_RETURN, INTEROP_TRACE, and IsReferenceType().
| size_t Cpp::GetNumBases | ( | ConstDeclRef | DRef | ) |
Definition at line 1244 of file CppInterOp.cpp.
References getInterp(), compat::InstantiateClassTemplateSpecialization(), INTEROP_RETURN, and INTEROP_TRACE.
Referenced by GetVariableOffset().
| void Cpp::GetOperator | ( | ConstDeclRef | DRef, |
| Operator | op, | ||
| std::vector< FuncRef > & | operators, | ||
| OperatorArity | kind | ||
| ) |
Definition at line 5593 of file CppInterOp.cpp.
References getInterp(), GetOperatorArity(), getSema(), INTEROP_OUT, INTEROP_TRACE, and INTEROP_VOID_RETURN.
| OperatorArity Cpp::GetOperatorArity | ( | ConstFuncRef | op | ) |
Definition at line 5569 of file CppInterOp.cpp.
References INTEROP_RETURN, and INTEROP_TRACE.
Referenced by GetOperator().
| Operator Cpp::GetOperatorFromSpelling | ( | const std::string & | op | ) |
Definition at line 5559 of file CppInterOp.cpp.
References INTEROP_RETURN, and INTEROP_TRACE.
| DeclRef Cpp::GetParentScope | ( | ConstDeclRef | DRef | ) |
Definition at line 1221 of file CppInterOp.cpp.
References INTEROP_RETURN, and INTEROP_TRACE.
| DiagnosticRef Cpp::GetPendingDiagnostic | ( | unsigned | Idx, |
| InterpRef | I | ||
| ) |
Definition at line 338 of file ErrorInternal.cpp.
References GetInterpInfo(), and GetPendingDiagnostic().
Referenced by GetPendingDiagnostic().
| unsigned Cpp::GetPendingDiagnosticCount | ( | InterpRef | I | ) |
Definition at line 334 of file ErrorInternal.cpp.
References GetInterpInfo(), GetPendingDiagnosticCount(), and Cpp::InterpreterInfo::StoredDiags.
Referenced by GetPendingDiagnosticCount().
| TypeRef Cpp::GetPointeeType | ( | ConstTypeRef | TyRef | ) |
Definition at line 2937 of file CppInterOp.cpp.
References INTEROP_RETURN, INTEROP_TRACE, and IsPointerType().
| TypeRef Cpp::GetPointerType | ( | ConstTypeRef | TyRef | ) |
Definition at line 2961 of file CppInterOp.cpp.
References getASTContext(), INTEROP_RETURN, and INTEROP_TRACE.
| std::string Cpp::GetQualifiedCompleteName | ( | ConstDeclRef | DRef | ) |
Definition at line 952 of file CppInterOp.cpp.
References GetCompleteNameImpl(), INTEROP_RETURN, and INTEROP_TRACE.
| std::string Cpp::GetQualifiedName | ( | ConstDeclRef | DRef | ) |
Definition at line 938 of file CppInterOp.cpp.
References INTEROP_RETURN, and INTEROP_TRACE.
|
static |
Definition at line 5810 of file CppInterOp.cpp.
Referenced by BeginStdStreamCapture(), and EndStdStreamCapture().
| TypeRef Cpp::GetReferencedType | ( | ConstTypeRef | TyRef, |
| bool | rvalue | ||
| ) |
Definition at line 2967 of file CppInterOp.cpp.
References getASTContext(), INTEROP_RETURN, and INTEROP_TRACE.
| const char * Cpp::GetResourceDir | ( | ) |
Definition at line 4924 of file CppInterOp.cpp.
References getInterp(), INTEROP_RETURN, and INTEROP_TRACE.
| DeclRef Cpp::GetScope | ( | const std::string & | name, |
| ConstDeclRef | parent | ||
| ) |
Definition at line 1043 of file CppInterOp.cpp.
References GetGlobalScope(), GetNamed(), INTEROP_RETURN, and INTEROP_TRACE.
Referenced by GetScopeFromCompleteName().
| DeclRef Cpp::GetScopeFromCompleteName | ( | const std::string & | name | ) |
Definition at line 1065 of file CppInterOp.cpp.
References GetScope(), INTEROP_RETURN, and INTEROP_TRACE.
| DeclRef Cpp::GetScopeFromType | ( | ConstTypeRef | TyRef | ) |
Definition at line 1014 of file CppInterOp.cpp.
References GetScopeFromType(), INTEROP_RETURN, and INTEROP_TRACE.
|
static |
Definition at line 1001 of file CppInterOp.cpp.
Referenced by GetClassDecls(), GetScopeFromType(), GetUnderlyingScopeImpl(), and InstantiateTemplate().
|
static |
Definition at line 366 of file CppInterOp.cpp.
References CppInternal::Interpreter::getCI(), and getInterp().
Referenced by BestOverloadFunctionMatch(), ExistsFunctionTemplate(), getASTContext(), GetBaseClassOffset(), GetClassDecls(), GetClassTemplatedMethods(), GetCompleteNameImpl(), GetDatamembers(), GetDestructor(), GetFunctionsUsingName(), GetGlobalScope(), GetNamed(), GetOperator(), GetSizeOfType(), GetVariableOffset(), InstantiateFunctionDefinition(), IsComplete(), IsTypeDerivedFrom(), LookupConstructors(), and LookupDatamember().
| size_t Cpp::GetSizeOfType | ( | ConstTypeRef | TyRef | ) |
Definition at line 858 of file CppInterOp.cpp.
References getSema(), INTEROP_RETURN, INTEROP_TRACE, and SizeOf().
| std::string Cpp::GetSpellingFromOperator | ( | Operator | Operator | ) |
Definition at line 5553 of file CppInterOp.cpp.
References INTEROP_RETURN, and INTEROP_TRACE.
| void Cpp::GetStaticDatamembers | ( | ConstDeclRef | DRef, |
| std::vector< DeclRef > & | datamembers | ||
| ) |
Definition at line 2627 of file CppInterOp.cpp.
References INTEROP_OUT, INTEROP_TRACE, and INTEROP_VOID_RETURN.
| Status Cpp::GetStatus | ( | ErrorRef | E | ) |
Definition at line 79 of file ErrorInternal.cpp.
| TypeRef Cpp::GetType | ( | const std::string & | name, |
| ConstDeclRef | parent | ||
| ) |
Definition at line 3203 of file CppInterOp.cpp.
References findBuiltinType(), getASTContext(), GetNamed(), GetTypeFromScope(), INTEROP_RETURN, and INTEROP_TRACE.
| std::string Cpp::GetTypeAsString | ( | ConstTypeRef | var | ) |
Definition at line 3006 of file CppInterOp.cpp.
References getASTContext(), INTEROP_RETURN, and INTEROP_TRACE.
Referenced by IsSmartPtrType().
| TypeRef Cpp::GetTypeFromScope | ( | ConstDeclRef | DRef | ) |
Definition at line 3219 of file CppInterOp.cpp.
References GetTypeInternal(), INTEROP_RETURN, and INTEROP_TRACE.
Referenced by GetType(), IsComplete(), and IsSubclass().
|
static |
Definition at line 3186 of file CppInterOp.cpp.
References compat::GetTypeFromDecl().
Referenced by GetTypeFromScope().
| DeclRef Cpp::GetUnderlyingScope | ( | ConstDeclRef | DRef | ) |
Definition at line 1032 of file CppInterOp.cpp.
References GetUnderlyingScopeImpl(), INTEROP_RETURN, and INTEROP_TRACE.
Referenced by GetClassTemplatedMethods(), GetFunctionsUsingName(), and GetNamed().
|
static |
Definition at line 1020 of file CppInterOp.cpp.
References GetScopeFromType().
Referenced by GetUnderlyingScope().
| TypeRef Cpp::GetUnderlyingType | ( | ConstTypeRef | TyRef | ) |
Definition at line 2985 of file CppInterOp.cpp.
References INTEROP_RETURN, and INTEROP_TRACE.
| std::vector< DeclRef > Cpp::GetUsingNamespaces | ( | ConstDeclRef | DRef | ) |
Definition at line 980 of file CppInterOp.cpp.
References INTEROP_RETURN, and INTEROP_TRACE.
|
static |
Definition at line 632 of file CppInterOp.cpp.
Referenced by InstantiateTemplate(), IsComplete(), and IsTypeDerivedFrom().
| ValueKind Cpp::GetValueKind | ( | ConstTypeRef | TyRef | ) |
Definition at line 2951 of file CppInterOp.cpp.
References INTEROP_RETURN, and INTEROP_TRACE.
| intptr_t Cpp::GetVariableOffset | ( | compat::Interpreter & | I, |
| Decl * | D, | ||
| CXXRecordDecl * | BaseCXXRD | ||
| ) |
Definition at line 2703 of file CppInterOp.cpp.
References ForceCodeGen(), CppInternal::Interpreter::getAddressOfGlobal(), GetBaseClass(), getInterp(), GetNumBases(), getSema(), CppInternal::Interpreter::getSema(), compat::getSymbolAddress(), and compat::maybeMangleDeclName().
Referenced by GetVariableOffset().
| intptr_t Cpp::GetVariableOffset | ( | ConstDeclRef | var, |
| ConstDeclRef | parent | ||
| ) |
Definition at line 2824 of file CppInterOp.cpp.
References getInterp(), GetVariableOffset(), INTEROP_RETURN, and INTEROP_TRACE.
| TypeRef Cpp::GetVariableType | ( | ConstDeclRef | var | ) |
Definition at line 2680 of file CppInterOp.cpp.
References INTEROP_RETURN, and INTEROP_TRACE.
| std::string Cpp::GetVersion | ( | ) |
Definition at line 513 of file CppInterOp.cpp.
References INTEROP_RETURN, and INTEROP_TRACE.
Referenced by CppInterOp::Tracing::GetCppInterOpLibPath(), CppInterOp::Tracing::TraceInfo::StopRegion(), and CppInterOp::Tracing::TraceInfo::writeToFile().
|
static |
Definition at line 2313 of file CppInterOp.cpp.
Referenced by MakeVTableOverlay().
| bool Cpp::HasDefaultConstructor | ( | ConstDeclRef | DRef | ) |
Definition at line 1452 of file CppInterOp.cpp.
References INTEROP_RETURN, and INTEROP_TRACE.
Referenced by Construct(), and GetDefaultConstructor().
| bool Cpp::HasTypeQualifier | ( | ConstTypeRef | TyRef, |
| QualKind | qual | ||
| ) |
Definition at line 3025 of file CppInterOp.cpp.
References INTEROP_RETURN, and INTEROP_TRACE.
| bool Cpp::InsertOrReplaceJitSymbol | ( | compat::Interpreter & | I, |
| const char * | linker_mangled_name, | ||
| uint64_t | address | ||
| ) |
Definition at line 5130 of file CppInterOp.cpp.
References compat::getExecutionEngine(), and compat::getSymbolAddress().
Referenced by InsertOrReplaceJitSymbol().
| bool Cpp::InsertOrReplaceJitSymbol | ( | const char * | linker_mangled_name, |
| uint64_t | address | ||
| ) |
Definition at line 5209 of file CppInterOp.cpp.
References getInterp(), InsertOrReplaceJitSymbol(), INTEROP_RETURN, and INTEROP_TRACE.
| void Cpp::InstallDiagConsumer | ( | InterpreterInfo * | II | ) |
Wire CppInterOp's DiagnosticConsumer into the interpreter's DiagnosticsEngine so parser/sema diagnostics flow into II->StoredDiags and continue forwarding to whatever consumer Clang already had.
Definition at line 310 of file ErrorInternal.cpp.
References InstallDiagConsumer().
Referenced by InstallDiagConsumer().
|
static |
Definition at line 567 of file CppInterOp.cpp.
References getInterp(), and getSema().
Referenced by GetFunctionAddress(), GetFunctionReturnType(), and InstantiateTemplate().
| DeclRef Cpp::InstantiateTemplate | ( | compat::Interpreter & | I, |
| DeclRef | tmpl, | ||
| const TemplateArgInfo * | template_args, | ||
| size_t | template_args_size, | ||
| bool | instantiate_body | ||
| ) |
Definition at line 5294 of file CppInterOp.cpp.
References getInterp(), CppInternal::Interpreter::getSema(), and InstantiateTemplate().
| DeclRef Cpp::InstantiateTemplate | ( | DeclRef | tmpl, |
| const std::vector< TemplateArgInfo > & | template_args, | ||
| bool | instantiate_body | ||
| ) |
Definition at line 5328 of file CppInterOp.cpp.
References getInterp(), InstantiateTemplate(), INTEROP_RETURN, and INTEROP_TRACE.
| DeclRef Cpp::InstantiateTemplate | ( | DeclRef | tmpl, |
| const TemplateArgInfo * | template_args, | ||
| size_t | template_args_size, | ||
| bool | instantiate_body | ||
| ) |
Definition at line 5321 of file CppInterOp.cpp.
References getInterp(), InstantiateTemplate(), INTEROP_RETURN, and INTEROP_TRACE.
| Decl * Cpp::InstantiateTemplate | ( | TemplateDecl * | TemplateD, |
| ArrayRef< TemplateArgument > | TemplateArgs, | ||
| Sema & | S, | ||
| bool | instantiate_body | ||
| ) |
Definition at line 5282 of file CppInterOp.cpp.
References InstantiateTemplate().
|
static |
Definition at line 5221 of file CppInterOp.cpp.
References GetScopeFromType(), GetValidSLoc(), and InstantiateFunctionDefinition().
Referenced by InstantiateTemplate(), InstantiateTemplate(), InstantiateTemplate(), and InstantiateTemplate().
| FuncRef Cpp::InstantiateTemplateFunctionFromString | ( | const char * | function_template | ) |
Definition at line 5376 of file CppInterOp.cpp.
References Declare(), GetNamed(), INTEROP_RETURN, and INTEROP_TRACE.
| bool Cpp::IsAbstract | ( | ConstDeclRef | DRef | ) |
Definition at line 713 of file CppInterOp.cpp.
References INTEROP_RETURN, and INTEROP_TRACE.
| bool Cpp::IsAggregate | ( | ConstDeclRef | DRef | ) |
Definition at line 583 of file CppInterOp.cpp.
References INTEROP_RETURN, and INTEROP_TRACE.
| bool Cpp::IsAllocator | ( | ConstFuncRef | Fn | ) |
Definition at line 1589 of file CppInterOp.cpp.
References INTEROP_RETURN, and INTEROP_TRACE.
| bool Cpp::IsBuiltin | ( | ConstTypeRef | TyRef | ) |
Definition at line 677 of file CppInterOp.cpp.
References INTEROP_RETURN, and INTEROP_TRACE.
| bool Cpp::IsClass | ( | ConstDeclRef | DRef | ) |
Definition at line 605 of file CppInterOp.cpp.
References INTEROP_RETURN, and INTEROP_TRACE.
Referenced by Construct().
| bool Cpp::IsClassPolymorphic | ( | ConstDeclRef | DRef | ) |
Definition at line 623 of file CppInterOp.cpp.
References INTEROP_RETURN, and INTEROP_TRACE.
| bool Cpp::IsComplete | ( | ConstDeclRef | DRef | ) |
Definition at line 638 of file CppInterOp.cpp.
References getInterp(), getSema(), GetTypeFromScope(), GetValidSLoc(), INTEROP_RETURN, and INTEROP_TRACE.
Referenced by SizeOf().
| bool Cpp::IsConstMethod | ( | ConstFuncRef | method | ) |
Definition at line 5527 of file CppInterOp.cpp.
References INTEROP_RETURN, and INTEROP_TRACE.
| bool Cpp::IsConstructor | ( | ConstFuncRef | method | ) |
Definition at line 2151 of file CppInterOp.cpp.
References INTEROP_RETURN, INTEROP_TRACE, and IsConstructor().
Referenced by Construct(), and IsConstructor().
| bool Cpp::IsConstVariable | ( | ConstDeclRef | var | ) |
Definition at line 2865 of file CppInterOp.cpp.
References INTEROP_RETURN, and INTEROP_TRACE.
| bool Cpp::IsDeallocator | ( | ConstFuncRef | Fn | ) |
Definition at line 1616 of file CppInterOp.cpp.
References INTEROP_RETURN, and INTEROP_TRACE.
| bool Cpp::IsDebugOutputEnabled | ( | ) |
Definition at line 562 of file CppInterOp.cpp.
References INTEROP_RETURN, and INTEROP_TRACE.
| bool Cpp::IsDestructor | ( | ConstFuncRef | method | ) |
Definition at line 2159 of file CppInterOp.cpp.
References INTEROP_RETURN, and INTEROP_TRACE.
| bool Cpp::IsEnumConstant | ( | ConstDeclRef | DRef | ) |
Definition at line 728 of file CppInterOp.cpp.
References INTEROP_RETURN, and INTEROP_TRACE.
| bool Cpp::IsEnumScope | ( | ConstDeclRef | DRef | ) |
Definition at line 722 of file CppInterOp.cpp.
References INTEROP_RETURN, and INTEROP_TRACE.
| bool Cpp::IsEnumType | ( | ConstTypeRef | TyRef | ) |
Definition at line 734 of file CppInterOp.cpp.
References INTEROP_RETURN, and INTEROP_TRACE.
| bool Cpp::IsExplicit | ( | ConstFuncRef | method | ) |
Definition at line 2178 of file CppInterOp.cpp.
References INTEROP_RETURN, and INTEROP_TRACE.
| bool Cpp::IsFloatingType | ( | ConstTypeRef | TyRef | ) |
Definition at line 2906 of file CppInterOp.cpp.
References INTEROP_RETURN, and INTEROP_TRACE.
| bool Cpp::IsFunction | ( | ConstDeclRef | DRef | ) |
Definition at line 611 of file CppInterOp.cpp.
References INTEROP_RETURN, and INTEROP_TRACE.
| bool Cpp::IsFunctionDeleted | ( | ConstFuncRef | function | ) |
Definition at line 1906 of file CppInterOp.cpp.
References INTEROP_RETURN, and INTEROP_TRACE.
| bool Cpp::IsFunctionPointerType | ( | ConstTypeRef | TyRef | ) |
Definition at line 617 of file CppInterOp.cpp.
References INTEROP_RETURN, and INTEROP_TRACE.
| bool Cpp::IsFunctionProtoType | ( | ConstTypeRef | TyRef | ) |
Definition at line 1633 of file CppInterOp.cpp.
References INTEROP_RETURN, and INTEROP_TRACE.
| bool Cpp::IsIntegerType | ( | ConstTypeRef | TyRef, |
| Signedness * | s | ||
| ) |
Definition at line 2892 of file CppInterOp.cpp.
References INTEROP_RETURN, and INTEROP_TRACE.
| bool Cpp::IsLambdaClass | ( | ConstTypeRef | TyRef | ) |
Definition at line 2671 of file CppInterOp.cpp.
References INTEROP_RETURN, and INTEROP_TRACE.
| bool Cpp::IsMethod | ( | ConstFuncRef | method | ) |
Definition at line 2127 of file CppInterOp.cpp.
References INTEROP_RETURN, and INTEROP_TRACE.
| bool Cpp::IsNamespace | ( | ConstDeclRef | DRef | ) |
Definition at line 599 of file CppInterOp.cpp.
References INTEROP_RETURN, and INTEROP_TRACE.
| bool Cpp::IsPODType | ( | ConstTypeRef | TyRef | ) |
Definition at line 2882 of file CppInterOp.cpp.
References getASTContext(), INTEROP_RETURN, and INTEROP_TRACE.
| bool Cpp::IsPointerType | ( | ConstTypeRef | TyRef | ) |
Definition at line 2923 of file CppInterOp.cpp.
References INTEROP_RETURN, and INTEROP_TRACE.
Referenced by GetPointeeType().
| bool Cpp::IsPrivateMethod | ( | ConstFuncRef | method | ) |
Definition at line 2146 of file CppInterOp.cpp.
References CheckMethodAccess(), INTEROP_RETURN, and INTEROP_TRACE.
| bool Cpp::IsPrivateVariable | ( | ConstDeclRef | var | ) |
Definition at line 2850 of file CppInterOp.cpp.
References CheckVariableAccess(), INTEROP_RETURN, and INTEROP_TRACE.
| bool Cpp::IsProtectedMethod | ( | ConstFuncRef | method | ) |
Definition at line 2140 of file CppInterOp.cpp.
References CheckMethodAccess(), INTEROP_RETURN, and INTEROP_TRACE.
| bool Cpp::IsProtectedVariable | ( | ConstDeclRef | var | ) |
Definition at line 2844 of file CppInterOp.cpp.
References CheckVariableAccess(), INTEROP_RETURN, and INTEROP_TRACE.
| bool Cpp::IsPublicMethod | ( | ConstFuncRef | method | ) |
Definition at line 2135 of file CppInterOp.cpp.
References CheckMethodAccess(), INTEROP_RETURN, and INTEROP_TRACE.
| bool Cpp::IsPublicVariable | ( | ConstDeclRef | var | ) |
Definition at line 2839 of file CppInterOp.cpp.
References CheckVariableAccess(), INTEROP_RETURN, and INTEROP_TRACE.
| bool Cpp::IsRecordType | ( | ConstTypeRef | TyRef | ) |
Definition at line 2876 of file CppInterOp.cpp.
References INTEROP_RETURN, and INTEROP_TRACE.
| bool Cpp::IsReferenceType | ( | ConstTypeRef | TyRef | ) |
Definition at line 2945 of file CppInterOp.cpp.
References INTEROP_RETURN, and INTEROP_TRACE.
Referenced by GetNonReferenceType().
| bool Cpp::IsSameType | ( | ConstTypeRef | type_a, |
| ConstTypeRef | type_b | ||
| ) |
Definition at line 2914 of file CppInterOp.cpp.
References getASTContext(), INTEROP_RETURN, and INTEROP_TRACE.
|
static |
Definition at line 740 of file CppInterOp.cpp.
Referenced by IsSmartPtrType().
| bool Cpp::IsSmartPtrType | ( | ConstTypeRef | TyRef | ) |
Definition at line 782 of file CppInterOp.cpp.
References GetTypeAsString(), INTEROP_RETURN, INTEROP_TRACE, and isSmartPointer().
| bool Cpp::IsStaticMethod | ( | ConstFuncRef | method | ) |
Definition at line 2165 of file CppInterOp.cpp.
References INTEROP_RETURN, and INTEROP_TRACE.
| bool Cpp::IsStaticVariable | ( | ConstDeclRef | var | ) |
Definition at line 2855 of file CppInterOp.cpp.
References INTEROP_RETURN, and INTEROP_TRACE.
| bool Cpp::IsSubclass | ( | ConstDeclRef | derived, |
| ConstDeclRef | base | ||
| ) |
Definition at line 1277 of file CppInterOp.cpp.
References GetTypeFromScope(), INTEROP_RETURN, INTEROP_TRACE, and IsTypeDerivedFrom().
| bool Cpp::IsTemplate | ( | ConstDeclRef | DRef | ) |
Definition at line 694 of file CppInterOp.cpp.
References INTEROP_RETURN, and INTEROP_TRACE.
| bool Cpp::IsTemplatedFunction | ( | ConstFuncRef | func | ) |
Definition at line 1912 of file CppInterOp.cpp.
References INTEROP_RETURN, INTEROP_TRACE, and IsTemplatedFunction().
Referenced by ExistsFunctionTemplate(), GetClassTemplatedMethods(), GetFunctionReturnType(), and IsTemplatedFunction().
| bool Cpp::IsTemplateParmType | ( | ConstTypeRef | TyRef | ) |
Definition at line 1852 of file CppInterOp.cpp.
References INTEROP_RETURN, and INTEROP_TRACE.
| bool Cpp::IsTemplateSpecialization | ( | ConstDeclRef | DRef | ) |
Definition at line 700 of file CppInterOp.cpp.
References INTEROP_RETURN, and INTEROP_TRACE.
Referenced by GetFunctionReturnType().
| bool Cpp::IsTypedefed | ( | ConstDeclRef | DRef | ) |
Definition at line 707 of file CppInterOp.cpp.
References INTEROP_RETURN, and INTEROP_TRACE.
| bool Cpp::IsTypeDerivedFrom | ( | ConstTypeRef | derived, |
| ConstTypeRef | base | ||
| ) |
Definition at line 5476 of file CppInterOp.cpp.
References getInterp(), getSema(), GetValidSLoc(), INTEROP_RETURN, and INTEROP_TRACE.
Referenced by IsSubclass().
| bool Cpp::IsVariable | ( | ConstDeclRef | DRef | ) |
Definition at line 870 of file CppInterOp.cpp.
References INTEROP_RETURN, and INTEROP_TRACE.
| bool Cpp::IsVirtualMethod | ( | ConstFuncRef | method | ) |
Definition at line 2254 of file CppInterOp.cpp.
References INTEROP_RETURN, and INTEROP_TRACE.
| bool Cpp::IsVoidPointerType | ( | ConstTypeRef | TyRef | ) |
Definition at line 2929 of file CppInterOp.cpp.
References INTEROP_RETURN, and INTEROP_TRACE.
|
inline |
Initialize all CppInterOp API from the dynamically loaded library.
Definition at line 129 of file Dispatch.h.
References CreateInterpreter(), dlGetProcAddress(), and GetInterpreter().
| bool Cpp::LoadLibrary | ( | const char * | lib_stem, |
| bool | lookup | ||
| ) |
Definition at line 5108 of file CppInterOp.cpp.
References getInterp(), INTEROP_RETURN, INTEROP_TRACE, CppInternal::Interpreter::kSuccess, and CppInternal::Interpreter::loadLibrary().
| void Cpp::LookupConstructors | ( | const std::string & | name, |
| ConstDeclRef | parent, | ||
| std::vector< FuncRef > & | funcs | ||
| ) |
Definition at line 1944 of file CppInterOp.cpp.
References GetName(), getSema(), INTEROP_OUT, INTEROP_TRACE, and INTEROP_VOID_RETURN.
Referenced by GetClassTemplatedMethods().
| DeclRef Cpp::LookupDatamember | ( | const std::string & | name, |
| ConstDeclRef | parent | ||
| ) |
Definition at line 2653 of file CppInterOp.cpp.
References getSema(), INTEROP_RETURN, INTEROP_TRACE, and CppInternal::utils::Lookup::Named().
| std::string Cpp::LookupLibrary | ( | const char * | lib_name | ) |
Definition at line 5102 of file CppInterOp.cpp.
References getInterp(), INTEROP_RETURN, and INTEROP_TRACE.
| ErrorRef Cpp::makeError | ( | InterpreterInfo * | II, |
| Status | S, | ||
| std::string | Message, | ||
| const char * | Producer, | ||
| const char * | ProducerSig | ||
| ) |
Build a slice-encoded error carrying a Clang-derived message + the interp's pending diagnostics + producer attribution.
Definition at line 173 of file ErrorInternal.cpp.
References AllocSlice(), Cpp::ErrorSlice::Code, Cpp::ErrorSlice::Diagnostics, DrainPendingInto(), makeError(), Cpp::StoredDiagView::Message, Cpp::ErrorSlice::Producer, Cpp::ErrorSlice::ProducerSignature, and Cpp::StoredDiagView::Sev.
| ErrorRef Cpp::makeError | ( | Status | S | ) |
Build an inline-status ErrorRef (no diagnostics, no payload).
Definition at line 171 of file ErrorInternal.cpp.
References makeError().
Referenced by makeError(), and makeError().
| JitCall Cpp::MakeFunctionCallable | ( | ConstFuncRef | func | ) |
Definition at line 4575 of file CppInterOp.cpp.
References getInterp(), INTEROP_RETURN, INTEROP_TRACE, and MakeFunctionCallable().
| JitCall Cpp::MakeFunctionCallable | ( | InterpRef | I, |
| ConstFuncRef | func | ||
| ) |
Definition at line 4542 of file CppInterOp.cpp.
References INTEROP_RETURN, INTEROP_TRACE, and Cpp::VTableOverlayDtorHost::Wrapper().
Referenced by Construct(), and MakeFunctionCallable().
|
inline |
Definition at line 112 of file ErrorInternal.h.
References drainError().
| Result< T > Cpp::makeResult | ( | InterpreterInfo * | II, |
| llvm::Expected< T > | E, | ||
| const char * | Producer, | ||
| const char * | ProducerSig | ||
| ) |
Convert llvm::Expected<T> into Result<T>.
On the error path, drain the carried llvm::Error into a slice.
Definition at line 105 of file ErrorInternal.h.
References drainError().
|
inline |
Owning wrapper over MakeVTableOverlay: each pair maps a virtual method of polymorphic class base to its replacement function pointer.
The overlay is installed on construction and the original vptr restored when the handle is destroyed. The caller works in reflected methods, not ABI-specific slot indices – the common path for language bindings. n_extra_prefix_slots reserves nullptr-initialized slots immediately before the ABI prefix for the caller to write per-instance data into. on_destroy, when non-null, is invoked once after the C++ destructor of inst runs (operator-delete path). It receives the original inst pointer (which may be dangling at that point – do not deref) and cleanup_data verbatim; bindings use it to release any per-instance state (Python handles, closures) tied to the object's lifetime. The callback must not throw: it runs inside a C++ destructor, so an escaping exception is undefined behavior.
Definition at line 86 of file CppInterOp.h.
References MakeVTableOverlay().
| VTableOverlay * Cpp::MakeVTableOverlay | ( | void * | inst, |
| ConstDeclRef | base, | ||
| const ConstFuncRef * | methods, | ||
| void *const * | overlay_fns, | ||
| std::size_t | n_overlays, | ||
| std::size_t | n_extra_prefix_slots, | ||
| VTableOverlayDtorHook | on_destroy, | ||
| void * | cleanup_data | ||
| ) |
Definition at line 2526 of file CppInterOp.cpp.
References applyVTableOverlay(), DtorFnToSlot(), hasComplexVTableLayout(), INTEROP_RETURN, INTEROP_TRACE, kDeletingDtorSlot, kMinVTableMethodSlots, SlotToDtorFn(), virtualMethodSlot(), vtableMethodSlotCount(), and Cpp::VTableOverlayDtorHost::Wrapper().
Referenced by MakeUniqueVTableOverlay().
| std::string Cpp::ObjToString | ( | const char * | TyRef, |
| void * | obj | ||
| ) |
Definition at line 5216 of file CppInterOp.cpp.
References getInterp(), INTEROP_RETURN, and INTEROP_TRACE.
|
static |
Definition at line 3097 of file CppInterOp.cpp.
References ACCESS, GetInterpreters(), and RegisterPerms().
Referenced by findBuiltinType().
| int Cpp::Process | ( | const char * | code | ) |
Definition at line 5016 of file CppInterOp.cpp.
References getInterp(), INTEROP_RETURN, and INTEROP_TRACE.
|
static |
Definition at line 278 of file CppInterOp.cpp.
Referenced by CreateInterpreter(), and UseExternalInterpreter().
|
static |
Definition at line 3083 of file CppInterOp.cpp.
Referenced by PopulateBuiltinMap().
| void Cpp::ReleaseErrorRef | ( | ErrorRef | E | ) |
Definition at line 148 of file ErrorInternal.cpp.
References ReleaseErrorRef().
Referenced by ReleaseErrorRef().
| TypeRef Cpp::RemoveTypeQualifier | ( | ConstTypeRef | TyRef, |
| QualKind | qual | ||
| ) |
Definition at line 3046 of file CppInterOp.cpp.
References INTEROP_RETURN, and INTEROP_TRACE.
| void Cpp::ResultAbort_UncheckedOnDtor | ( | const ErrorRef & | ) |
Definition at line 360 of file ErrorInternal.cpp.
References ResultAbort_UncheckedOnDtor().
Referenced by ResultAbort_UncheckedOnDtor().
| void Cpp::ResultAbort_ValueOnError | ( | const ErrorRef & | ) |
Definition at line 350 of file ErrorInternal.cpp.
References ResultAbort_ValueOnError().
Referenced by ResultAbort_ValueOnError().
| void Cpp::RetainErrorRef | ( | ErrorRef | E | ) |
Definition at line 141 of file ErrorInternal.cpp.
References RetainErrorRef().
Referenced by RetainErrorRef().
| std::string Cpp::SearchLibrariesForSymbol | ( | const char * | mangled_name, |
| bool | search_system | ||
| ) |
Definition at line 5122 of file CppInterOp.cpp.
References CppInternal::Interpreter::getDynamicLibraryManager(), getInterp(), INTEROP_RETURN, and INTEROP_TRACE.
| size_t Cpp::SizeOf | ( | ConstDeclRef | DRef | ) |
Definition at line 662 of file CppInterOp.cpp.
References INTEROP_RETURN, INTEROP_TRACE, and IsComplete().
Referenced by Allocate(), Deallocate(), and GetSizeOfType().
|
static |
Definition at line 2359 of file CppInterOp.cpp.
Referenced by MakeVTableOverlay().
| int Cpp::Undo | ( | unsigned | N | ) |
Definition at line 5839 of file CppInterOp.cpp.
References getInterp(), INTEROP_RETURN, INTEROP_TRACE, and CppInternal::Interpreter::kSuccess.
|
inline |
Definition at line 158 of file Dispatch.h.
References dlGetProcAddress().
| void Cpp::UnloadLibrary | ( | const char * | lib_stem | ) |
Definition at line 5116 of file CppInterOp.cpp.
References CppInternal::Interpreter::getDynamicLibraryManager(), getInterp(), INTEROP_TRACE, INTEROP_VOID_RETURN, and CppInternal::DynamicLibraryManager::unloadLibrary().
| const T * Cpp::unwrap | ( | ConstDeclRef | H | ) |
| const T * Cpp::unwrap | ( | ConstFuncRef | H | ) |
| const T * Cpp::unwrap | ( | ConstTypeRef | H | ) |
| void Cpp::UseExternalInterpreter | ( | InterpRef | I | ) |
Definition at line 315 of file CppInterOp.cpp.
References GetInterpreters(), INTEROP_TRACE, INTEROP_VOID_RETURN, RegisterInterpreter(), and SkipShutDown.
|
static |
Definition at line 2268 of file CppInterOp.cpp.
References getASTContext().
Referenced by MakeVTableOverlay().
|
static |
Definition at line 2285 of file CppInterOp.cpp.
References getASTContext().
Referenced by MakeVTableOverlay().
|
inline |
Address of the i-th extra-prefix slot of an instance with an overlay installed via MakeVTableOverlay(..., n_extra_prefix_slots = N, ...).
Returns a void*& so callers read and write through the same expression; this is the canonical access path – bindings should not synthesize the vptr arithmetic themselves. Behavior is undefined if inst has no overlay or i >= N.
Definition at line 61 of file CppInterOp.h.
References Cpp::detail::kVTableOverlayPrefixSize.
| Handle Cpp::wrap | ( | const void * | P | ) |
|
constexpr |
Definition at line 2334 of file CppInterOp.cpp.
Referenced by applyVTableOverlay().
|
constexpr |
Definition at line 2522 of file CppInterOp.cpp.
Referenced by MakeVTableOverlay().
|
constexpr |
Definition at line 2470 of file CppInterOp.cpp.
Referenced by applyVTableOverlay(), and MakeVTableOverlay().
|
static |
Set by UseExternalInterpreter to suppress llvm_shutdown at process exit – the client owns LLVM in that case.
Definition at line 181 of file CppInterOp.cpp.
Referenced by UseExternalInterpreter(), and Cpp::InterpreterShutdown::~InterpreterShutdown().