diff options
Diffstat (limited to 'contrib/llvm-project/lldb/include/lldb/Symbol/TypeSystem.h')
-rw-r--r-- | contrib/llvm-project/lldb/include/lldb/Symbol/TypeSystem.h | 35 |
1 files changed, 27 insertions, 8 deletions
diff --git a/contrib/llvm-project/lldb/include/lldb/Symbol/TypeSystem.h b/contrib/llvm-project/lldb/include/lldb/Symbol/TypeSystem.h index e188f29354b8..1fad8f61ac37 100644 --- a/contrib/llvm-project/lldb/include/lldb/Symbol/TypeSystem.h +++ b/contrib/llvm-project/lldb/include/lldb/Symbol/TypeSystem.h @@ -152,8 +152,7 @@ public: virtual bool IsFloatingPointType(lldb::opaque_compiler_type_t type, uint32_t &count, bool &is_complex) = 0; - virtual bool IsFunctionType(lldb::opaque_compiler_type_t type, - bool *is_variadic_ptr) = 0; + virtual bool IsFunctionType(lldb::opaque_compiler_type_t type) = 0; virtual size_t GetNumberOfFunctionArguments(lldb::opaque_compiler_type_t type) = 0; @@ -176,6 +175,8 @@ public: return false; } + virtual bool IsScopedEnumerationType(lldb::opaque_compiler_type_t type) = 0; + virtual bool IsPossibleDynamicType(lldb::opaque_compiler_type_t type, CompilerType *target_type, // Can pass NULL bool check_cplusplus, bool check_objc) = 0; @@ -217,14 +218,18 @@ public: // Creating related types - virtual CompilerType GetArrayElementType(lldb::opaque_compiler_type_t type, - uint64_t *stride) = 0; + virtual CompilerType + GetArrayElementType(lldb::opaque_compiler_type_t type, + ExecutionContextScope *exe_scope) = 0; virtual CompilerType GetArrayType(lldb::opaque_compiler_type_t type, uint64_t size); virtual CompilerType GetCanonicalType(lldb::opaque_compiler_type_t type) = 0; + virtual CompilerType + GetEnumerationIntegerType(lldb::opaque_compiler_type_t type) = 0; + // Returns -1 if this isn't a function of if the function doesn't have a // prototype Returns a value >= 0 if there is a prototype. virtual int GetFunctionArgumentCount(lldb::opaque_compiler_type_t type) = 0; @@ -464,10 +469,8 @@ public: return nullptr; } - virtual UtilityFunction *GetUtilityFunction(const char *text, - const char *name) { - return nullptr; - } + virtual std::unique_ptr<UtilityFunction> + CreateUtilityFunction(std::string text, std::string name); virtual PersistentExpressionState *GetPersistentExpressionState() { return nullptr; @@ -522,6 +525,22 @@ protected: ///multi-threaded environments. collection m_map; bool m_clear_in_progress; + +private: + typedef llvm::function_ref<lldb::TypeSystemSP()> CreateCallback; + /// Finds the type system for the given language. If no type system could be + /// found for a language and a CreateCallback was provided, the value returned + /// by the callback will be treated as the TypeSystem for the language. + /// + /// \param language The language for which the type system should be found. + /// \param create_callback A callback that will be called if no previously + /// created TypeSystem that fits the given language + /// could found. Can be omitted if a non-existent + /// type system should be treated as an error instead. + /// \return The found type system or an error. + llvm::Expected<TypeSystem &> GetTypeSystemForLanguage( + lldb::LanguageType language, + llvm::Optional<CreateCallback> create_callback = llvm::None); }; } // namespace lldb_private |