LLDB  mainline
TypeSystem.h
Go to the documentation of this file.
1 //===-- TypeSystem.h ------------------------------------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #ifndef liblldb_TypeSystem_h_
10 #define liblldb_TypeSystem_h_
11 
12 #include <functional>
13 #include <map>
14 #include <mutex>
15 #include <string>
16 
17 #include "llvm/ADT/APSInt.h"
18 #include "llvm/Support/Casting.h"
19 
24 #include "lldb/lldb-private.h"
25 
26 class DWARFDIE;
27 class DWARFASTParser;
28 class PDBASTParser;
29 
30 namespace lldb_private {
31 
32 // Interface for representing the Type Systems in different languages.
33 class TypeSystem : public PluginInterface {
34 public:
35  // Intrusive type system that allows us to use llvm casting.
36  //
37  // To add a new type system:
38  //
39  // 1 - Add a new enumeration for llvm casting below for your TypeSystem
40  // subclass, here we will use eKindFoo
41  //
42  // 2 - Your TypeSystem subclass will inherit from TypeSystem and needs
43  // to implement a static classof() function that returns your
44  // enumeration:
45  //
46  // class Foo : public lldb_private::TypeSystem
47  // {
48  // static bool classof(const TypeSystem *ts)
49  // {
50  // return ts->getKind() == TypeSystem::eKindFoo;
51  // }
52  // };
53  //
54  // 3 - Contruct your TypeSystem subclass with the enumeration from below
55  //
56  // Foo() :
57  // TypeSystem(TypeSystem::eKindFoo),
58  // ...
59  // {
60  // }
61  //
62  // Then you can use the llvm casting on any "TypeSystem *" to get an instance
63  // of your subclass.
64  enum LLVMCastKind {
69  };
70 
71  // Constructors and Destructors
73 
74  ~TypeSystem() override;
75 
76  LLVMCastKind getKind() const { return m_kind; }
77 
78  static lldb::TypeSystemSP CreateInstance(lldb::LanguageType language,
79  Module *module);
80 
81  static lldb::TypeSystemSP CreateInstance(lldb::LanguageType language,
82  Target *target);
83 
84  // Free up any resources associated with this TypeSystem. Done before
85  // removing all the TypeSystems from the TypeSystemMap.
86  virtual void Finalize() {}
87 
88  virtual DWARFASTParser *GetDWARFParser() { return nullptr; }
89  virtual PDBASTParser *GetPDBParser() { return nullptr; }
90 
91  virtual SymbolFile *GetSymbolFile() const { return m_sym_file; }
92 
93  // Returns true if the symbol file changed during the set accessor.
94  virtual void SetSymbolFile(SymbolFile *sym_file) { m_sym_file = sym_file; }
95 
96  // CompilerDecl functions
97  virtual ConstString DeclGetName(void *opaque_decl) = 0;
98 
99  virtual ConstString DeclGetMangledName(void *opaque_decl);
100 
101  virtual CompilerDeclContext DeclGetDeclContext(void *opaque_decl);
102 
103  virtual CompilerType DeclGetFunctionReturnType(void *opaque_decl);
104 
105  virtual size_t DeclGetFunctionNumArguments(void *opaque_decl);
106 
107  virtual CompilerType DeclGetFunctionArgumentType(void *opaque_decl,
108  size_t arg_idx);
109 
110  // CompilerDeclContext functions
111 
112  virtual std::vector<CompilerDecl>
113  DeclContextFindDeclByName(void *opaque_decl_ctx, ConstString name,
114  const bool ignore_imported_decls);
115 
116  virtual bool DeclContextIsStructUnionOrClass(void *opaque_decl_ctx) = 0;
117 
118  virtual ConstString DeclContextGetName(void *opaque_decl_ctx) = 0;
119 
120  virtual ConstString
121  DeclContextGetScopeQualifiedName(void *opaque_decl_ctx) = 0;
122 
123  virtual bool DeclContextIsClassMethod(
124  void *opaque_decl_ctx, lldb::LanguageType *language_ptr,
125  bool *is_instance_method_ptr, ConstString *language_object_name_ptr) = 0;
126 
127  virtual bool DeclContextIsContainedInLookup(void *opaque_decl_ctx,
128  void *other_opaque_decl_ctx) = 0;
129 
130  // Tests
131 
132  virtual bool IsArrayType(lldb::opaque_compiler_type_t type,
133  CompilerType *element_type, uint64_t *size,
134  bool *is_incomplete) = 0;
135 
136  virtual bool IsAggregateType(lldb::opaque_compiler_type_t type) = 0;
137 
139 
140  virtual bool IsCharType(lldb::opaque_compiler_type_t type) = 0;
141 
142  virtual bool IsCompleteType(lldb::opaque_compiler_type_t type) = 0;
143 
144  virtual bool IsDefined(lldb::opaque_compiler_type_t type) = 0;
145 
147  uint32_t &count, bool &is_complex) = 0;
148 
150  bool *is_variadic_ptr) = 0;
151 
152  virtual size_t
154 
155  virtual CompilerType
157  const size_t index) = 0;
158 
160 
162  CompilerType *function_pointer_type_ptr) = 0;
163 
165  bool &is_signed) = 0;
166 
168  bool &is_signed) {
169  is_signed = false;
170  return false;
171  }
172 
174  CompilerType *target_type, // Can pass NULL
175  bool check_cplusplus, bool check_objc) = 0;
176 
178  CompilerType *pointee_type) = 0;
179 
180  virtual bool IsScalarType(lldb::opaque_compiler_type_t type) = 0;
181 
182  virtual bool IsVoidType(lldb::opaque_compiler_type_t type) = 0;
183 
184  // TypeSystems can support more than one language
185  virtual bool SupportsLanguage(lldb::LanguageType language) = 0;
186 
187  // Type Completion
188 
189  virtual bool GetCompleteType(lldb::opaque_compiler_type_t type) = 0;
190 
191  // AST related queries
192 
193  virtual uint32_t GetPointerByteSize() = 0;
194 
195  // Accessors
196 
198 
199  virtual uint32_t
201  CompilerType *pointee_or_element_compiler_type) = 0;
202 
203  virtual lldb::LanguageType
205 
206  virtual lldb::TypeClass GetTypeClass(lldb::opaque_compiler_type_t type) = 0;
207 
208  // Creating related types
209 
211  uint64_t *stride) = 0;
212 
214  uint64_t size);
215 
217 
218  // Returns -1 if this isn't a function of if the function doesn't have a
219  // prototype Returns a value >= 0 if there is a prototype.
221 
222  virtual CompilerType
224  size_t idx) = 0;
225 
226  virtual CompilerType
228 
229  virtual size_t GetNumMemberFunctions(lldb::opaque_compiler_type_t type) = 0;
230 
231  virtual TypeMemberFunctionImpl
233 
235 
237 
238  virtual CompilerType
240 
241  virtual CompilerType
243 
245 
247 
249 
251  const char *name,
252  const CompilerDeclContext &decl_ctx);
253 
254  // Exploring the type
255 
256  virtual llvm::Optional<uint64_t>
258  ExecutionContextScope *exe_scope) = 0;
259 
261  uint64_t &count) = 0;
262 
264 
266  bool omit_empty_base_classes,
267  const ExecutionContext *exe_ctx) = 0;
268 
270 
271  virtual lldb::BasicType
273 
274  virtual void ForEachEnumerator(
276  std::function<bool(const CompilerType &integer_type,
277  ConstString name,
278  const llvm::APSInt &value)> const &callback) {}
279 
281 
283  size_t idx, std::string &name,
284  uint64_t *bit_offset_ptr,
285  uint32_t *bitfield_bit_size_ptr,
286  bool *is_bitfield_ptr) = 0;
287 
288  virtual uint32_t
290 
291  virtual uint32_t
293 
294  virtual CompilerType
296  uint32_t *bit_offset_ptr) = 0;
297 
298  virtual CompilerType
300  uint32_t *bit_offset_ptr) = 0;
301 
303  lldb::opaque_compiler_type_t type, ExecutionContext *exe_ctx, size_t idx,
304  bool transparent_pointers, bool omit_empty_base_classes,
305  bool ignore_array_bounds, std::string &child_name,
306  uint32_t &child_byte_size, int32_t &child_byte_offset,
307  uint32_t &child_bitfield_bit_size, uint32_t &child_bitfield_bit_offset,
308  bool &child_is_base_class, bool &child_is_deref_of_parent,
309  ValueObject *valobj, uint64_t &language_flags) = 0;
310 
311  // Lookup a child given a name. This function will match base class names and
312  // member member names in "clang_type" only, not descendants.
314  const char *name,
315  bool omit_empty_base_classes) = 0;
316 
317  // Lookup a child member given a name. This function will match member names
318  // only and will descend into "clang_type" children in search for the first
319  // member in this class, or any base class that matches "name".
320  // TODO: Return all matches for a given name by returning a
321  // vector<vector<uint32_t>>
322  // so we catch all names that match a given child name, not just the first.
323  virtual size_t
325  const char *name, bool omit_empty_base_classes,
326  std::vector<uint32_t> &child_indexes) = 0;
327 
329 
333  size_t idx);
334  virtual llvm::Optional<CompilerType::IntegralTemplateArgument>
336 
337  // Dumping types
338 
339 #ifndef NDEBUG
340  /// Convenience LLVM-style dump method for use in the debugger only.
341  LLVM_DUMP_METHOD virtual void
342  dump(lldb::opaque_compiler_type_t type) const = 0;
343 #endif
344 
345  virtual void DumpValue(lldb::opaque_compiler_type_t type,
346  ExecutionContext *exe_ctx, Stream *s,
347  lldb::Format format, const DataExtractor &data,
348  lldb::offset_t data_offset, size_t data_byte_size,
349  uint32_t bitfield_bit_size,
350  uint32_t bitfield_bit_offset, bool show_types,
351  bool show_summary, bool verbose, uint32_t depth) = 0;
352 
353  virtual bool DumpTypeValue(lldb::opaque_compiler_type_t type, Stream *s,
354  lldb::Format format, const DataExtractor &data,
355  lldb::offset_t data_offset, size_t data_byte_size,
356  uint32_t bitfield_bit_size,
357  uint32_t bitfield_bit_offset,
358  ExecutionContextScope *exe_scope) = 0;
359 
360  virtual void
361  DumpTypeDescription(lldb::opaque_compiler_type_t type) = 0; // Dump to stdout
362 
364  Stream *s) = 0;
365 
366  // TODO: These methods appear unused. Should they be removed?
367 
369 
370  virtual void DumpSummary(lldb::opaque_compiler_type_t type,
371  ExecutionContext *exe_ctx, Stream *s,
372  const DataExtractor &data,
373  lldb::offset_t data_offset,
374  size_t data_byte_size) = 0;
375 
376  // Converts "s" to a floating point value and place resulting floating point
377  // bytes in the "dst" buffer.
379  const char *s, uint8_t *dst,
380  size_t dst_size) = 0;
381 
382  // TODO: Determine if these methods should move to ClangASTContext.
383 
385  CompilerType *pointee_type) = 0;
386 
387  virtual unsigned GetTypeQualifiers(lldb::opaque_compiler_type_t type) = 0;
388 
390  uint32_t &length) = 0;
391 
392  virtual size_t GetTypeBitAlign(lldb::opaque_compiler_type_t type) = 0;
393 
394  virtual CompilerType GetBasicTypeFromAST(lldb::BasicType basic_type) = 0;
395 
396  virtual CompilerType
398  size_t bit_size) = 0;
399 
400  virtual bool IsBeingDefined(lldb::opaque_compiler_type_t type) = 0;
401 
402  virtual bool IsConst(lldb::opaque_compiler_type_t type) = 0;
403 
405  CompilerType *base_type_ptr) = 0;
406 
407  virtual bool IsPolymorphicClass(lldb::opaque_compiler_type_t type) = 0;
408 
409  virtual bool IsTypedefType(lldb::opaque_compiler_type_t type) = 0;
410 
411  // If the current object represents a typedef type, get the underlying type
413 
414  virtual bool IsVectorType(lldb::opaque_compiler_type_t type,
415  CompilerType *element_type, uint64_t *size) = 0;
416 
417  virtual CompilerType
419 
420  virtual CompilerType
422 
424  CompilerType *pointee_type, bool *is_rvalue) = 0;
425 
426  virtual bool
428  return IsPointerOrReferenceType(type, nullptr);
429  }
430 
431  virtual UserExpression *
432  GetUserExpression(llvm::StringRef expr, llvm::StringRef prefix,
433  lldb::LanguageType language,
434  Expression::ResultType desired_type,
435  const EvaluateExpressionOptions &options,
436  ValueObject *ctx_obj) {
437  return nullptr;
438  }
439 
440  virtual FunctionCaller *GetFunctionCaller(const CompilerType &return_type,
441  const Address &function_address,
442  const ValueList &arg_value_list,
443  const char *name) {
444  return nullptr;
445  }
446 
447  virtual UtilityFunction *GetUtilityFunction(const char *text,
448  const char *name) {
449  return nullptr;
450  }
451 
453  return nullptr;
454  }
455 
456  virtual CompilerType GetTypeForFormatters(void *type);
457 
458  virtual LazyBool ShouldPrintAsOneLiner(void *type, ValueObject *valobj);
459 
460  // Type systems can have types that are placeholder types, which are meant to
461  // indicate the presence of a type, but offer no actual information about
462  // said types, and leave the burden of actually figuring type information out
463  // to dynamic type resolution. For instance a language with a generics
464  // system, can use placeholder types to indicate "type argument goes here",
465  // without promising uniqueness of the placeholder, nor attaching any
466  // actually idenfiable information to said placeholder. This API allows type
467  // systems to tell LLDB when such a type has been encountered In response,
468  // the debugger can react by not using this type as a cache entry in any
469  // type-specific way For instance, LLDB will currently not cache any
470  // formatters that are discovered on such a type as attributable to the
471  // meaningless type itself, instead preferring to use the dynamic type
472  virtual bool IsMeaninglessWithoutDynamicResolution(void *type);
473 
474 protected:
475  const LLVMCastKind m_kind; // Support for llvm casting
477 };
478 
480 public:
481  TypeSystemMap();
482  ~TypeSystemMap();
483 
484  // Clear calls Finalize on all the TypeSystems managed by this map, and then
485  // empties the map.
486  void Clear();
487 
488  // Iterate through all of the type systems that are created. Return true from
489  // callback to keep iterating, false to stop iterating.
490  void ForEach(std::function<bool(TypeSystem *)> const &callback);
491 
492  TypeSystem *GetTypeSystemForLanguage(lldb::LanguageType language,
493  Module *module, bool can_create);
494 
495  TypeSystem *GetTypeSystemForLanguage(lldb::LanguageType language,
496  Target *target, bool can_create);
497 
498 protected:
499  // This function does not take the map mutex, and should only be called from
500  // functions that do take the mutex.
501  void AddToMap(lldb::LanguageType language,
502  lldb::TypeSystemSP const &type_system_sp);
503 
504  typedef std::map<lldb::LanguageType, lldb::TypeSystemSP> collection;
505  mutable std::mutex m_mutex; ///< A mutex to keep this object happy in
506  ///multi-threaded environments.
507  collection m_map;
509 };
510 
511 } // namespace lldb_private
512 
513 #endif // liblldb_TypeSystem_h_
virtual bool IsAnonymousType(lldb::opaque_compiler_type_t type)
Definition: TypeSystem.cpp:56
virtual UtilityFunction * GetUtilityFunction(const char *text, const char *name)
Definition: TypeSystem.h:447
An data extractor class.
Definition: DataExtractor.h:47
virtual size_t ConvertStringToFloatValue(lldb::opaque_compiler_type_t type, const char *s, uint8_t *dst, size_t dst_size)=0
virtual CompilerType AddVolatileModifier(lldb::opaque_compiler_type_t type)
Definition: TypeSystem.cpp:80
virtual bool IsMeaninglessWithoutDynamicResolution(void *type)
Definition: TypeSystem.cpp:127
virtual void DumpSummary(lldb::opaque_compiler_type_t type, ExecutionContext *exe_ctx, Stream *s, const DataExtractor &data, lldb::offset_t data_offset, size_t data_byte_size)=0
Enumerations for broadcasting.
Definition: SBLaunchInfo.h:14
virtual CompilerType GetPointeeType(lldb::opaque_compiler_type_t type)=0
virtual bool IsFloatingPointType(lldb::opaque_compiler_type_t type, uint32_t &count, bool &is_complex)=0
A stream class that can stream formatted output to a file.
Definition: Stream.h:28
virtual bool DeclContextIsClassMethod(void *opaque_decl_ctx, lldb::LanguageType *language_ptr, bool *is_instance_method_ptr, ConstString *language_object_name_ptr)=0
virtual bool GetCompleteType(lldb::opaque_compiler_type_t type)=0
virtual bool ShouldTreatScalarValueAsAddress(lldb::opaque_compiler_type_t type)
Definition: TypeSystem.h:427
virtual ConstString DeclContextGetName(void *opaque_decl_ctx)=0
virtual void SetSymbolFile(SymbolFile *sym_file)
Definition: TypeSystem.h:94
virtual bool IsScalarType(lldb::opaque_compiler_type_t type)=0
virtual ConstString GetTypeName(lldb::opaque_compiler_type_t type)=0
virtual CompilerType GetNonReferenceType(lldb::opaque_compiler_type_t type)=0
virtual UserExpression * GetUserExpression(llvm::StringRef expr, llvm::StringRef prefix, lldb::LanguageType language, Expression::ResultType desired_type, const EvaluateExpressionOptions &options, ValueObject *ctx_obj)
Definition: TypeSystem.h:432
virtual CompilerType GetLValueReferenceType(lldb::opaque_compiler_type_t type)
Definition: TypeSystem.cpp:66
virtual uint32_t IsHomogeneousAggregate(lldb::opaque_compiler_type_t type, CompilerType *base_type_ptr)=0
Encapsulates a one-time expression for use in lldb.
void * opaque_compiler_type_t
Definition: lldb-types.h:90
virtual SymbolFile * GetSymbolFile() const
Definition: TypeSystem.h:91
virtual bool IsCharType(lldb::opaque_compiler_type_t type)=0
virtual void ForEachEnumerator(lldb::opaque_compiler_type_t type, std::function< bool(const CompilerType &integer_type, ConstString name, const llvm::APSInt &value)> const &callback)
Definition: TypeSystem.h:274
virtual bool IsPossibleDynamicType(lldb::opaque_compiler_type_t type, CompilerType *target_type, bool check_cplusplus, bool check_objc)=0
virtual CompilerType GetChildCompilerTypeAtIndex(lldb::opaque_compiler_type_t type, ExecutionContext *exe_ctx, size_t idx, bool transparent_pointers, bool omit_empty_base_classes, bool ignore_array_bounds, std::string &child_name, uint32_t &child_byte_size, int32_t &child_byte_offset, uint32_t &child_bitfield_bit_size, uint32_t &child_bitfield_bit_offset, bool &child_is_base_class, bool &child_is_deref_of_parent, ValueObject *valobj, uint64_t &language_flags)=0
virtual void DumpTypeDescription(lldb::opaque_compiler_type_t type)=0
virtual lldb::TemplateArgumentKind GetTemplateArgumentKind(lldb::opaque_compiler_type_t type, size_t idx)
Definition: TypeSystem.cpp:108
"lldb/Target/ExecutionContext.h" A class that contains an execution context.
virtual void DumpValue(lldb::opaque_compiler_type_t type, ExecutionContext *exe_ctx, Stream *s, lldb::Format format, const DataExtractor &data, lldb::offset_t data_offset, size_t data_byte_size, uint32_t bitfield_bit_size, uint32_t bitfield_bit_offset, bool show_types, bool show_summary, bool verbose, uint32_t depth)=0
virtual CompilerType GetFunctionArgumentTypeAtIndex(lldb::opaque_compiler_type_t type, size_t idx)=0
LLVMCastKind getKind() const
Definition: TypeSystem.h:76
virtual uint32_t GetNumDirectBaseClasses(lldb::opaque_compiler_type_t type)=0
virtual CompilerType GetCanonicalType(lldb::opaque_compiler_type_t type)=0
virtual bool DeclContextIsContainedInLookup(void *opaque_decl_ctx, void *other_opaque_decl_ctx)=0
virtual CompilerType GetVirtualBaseClassAtIndex(lldb::opaque_compiler_type_t type, size_t idx, uint32_t *bit_offset_ptr)=0
virtual size_t GetNumberOfFunctionArguments(lldb::opaque_compiler_type_t type)=0
TypeSystem(LLVMCastKind kind)
Definition: TypeSystem.cpp:27
virtual CompilerType DeclGetFunctionReturnType(void *opaque_decl)
Definition: TypeSystem.cpp:139
virtual lldb::Encoding GetEncoding(lldb::opaque_compiler_type_t type, uint64_t &count)=0
virtual bool IsDefined(lldb::opaque_compiler_type_t type)=0
virtual lldb::BasicType GetBasicTypeEnumeration(lldb::opaque_compiler_type_t type)=0
virtual ConstString DeclGetName(void *opaque_decl)=0
virtual uint32_t GetTypeInfo(lldb::opaque_compiler_type_t type, CompilerType *pointee_or_element_compiler_type)=0
virtual CompilerType GetTypedefedType(lldb::opaque_compiler_type_t type)=0
virtual ConstString DeclContextGetScopeQualifiedName(void *opaque_decl_ctx)=0
virtual bool IsEnumerationType(lldb::opaque_compiler_type_t type, bool &is_signed)
Definition: TypeSystem.h:167
virtual bool IsVectorType(lldb::opaque_compiler_type_t type, CompilerType *element_type, uint64_t *size)=0
LanguageType
Programming language type.
virtual uint32_t GetNumVirtualBaseClasses(lldb::opaque_compiler_type_t type)=0
virtual CompilerType GetTypeForFormatters(void *type)
Definition: TypeSystem.cpp:99
virtual bool IsFunctionType(lldb::opaque_compiler_type_t type, bool *is_variadic_ptr)=0
virtual PDBASTParser * GetPDBParser()
Definition: TypeSystem.h:89
uint64_t offset_t
Definition: lldb-types.h:87
virtual bool DeclContextIsStructUnionOrClass(void *opaque_decl_ctx)=0
virtual CompilerType GetArrayType(lldb::opaque_compiler_type_t type, uint64_t size)
Definition: TypeSystem.cpp:60
virtual LLVM_DUMP_METHOD void dump(lldb::opaque_compiler_type_t type) const =0
Convenience LLVM-style dump method for use in the debugger only.
A class that describes an executable image and its associated object and symbol files.
Definition: Module.h:109
virtual bool IsCStringType(lldb::opaque_compiler_type_t type, uint32_t &length)=0
virtual bool IsCompleteType(lldb::opaque_compiler_type_t type)=0
virtual CompilerType GetBasicTypeFromAST(lldb::BasicType basic_type)=0
virtual uint32_t GetNumChildren(lldb::opaque_compiler_type_t type, bool omit_empty_base_classes, const ExecutionContext *exe_ctx)=0
virtual bool IsPointerOrReferenceType(lldb::opaque_compiler_type_t type, CompilerType *pointee_type)=0
virtual CompilerType DeclGetFunctionArgumentType(void *opaque_decl, size_t arg_idx)
Definition: TypeSystem.cpp:145
virtual bool IsAggregateType(lldb::opaque_compiler_type_t type)=0
Encapsulates a function that can be called.
SymbolFile * m_sym_file
Definition: TypeSystem.h:476
virtual uint32_t GetIndexOfChildWithName(lldb::opaque_compiler_type_t type, const char *name, bool omit_empty_base_classes)=0
"lldb/Target/ExecutionContextScope.h" Inherit from this if your object can reconstruct its execution ...
virtual bool IsReferenceType(lldb::opaque_compiler_type_t type, CompilerType *pointee_type, bool *is_rvalue)=0
virtual lldb::TypeClass GetTypeClass(lldb::opaque_compiler_type_t type)=0
virtual lldb::Format GetFormat(lldb::opaque_compiler_type_t type)=0
virtual CompilerType GetBuiltinTypeForEncodingAndBitSize(lldb::Encoding encoding, size_t bit_size)=0
static lldb::TypeSystemSP CreateInstance(lldb::LanguageType language, Module *module)
Definition: TypeSystem.cpp:46
virtual uint32_t GetNumFields(lldb::opaque_compiler_type_t type)=0
virtual bool IsBlockPointerType(lldb::opaque_compiler_type_t type, CompilerType *function_pointer_type_ptr)=0
virtual CompilerDeclContext DeclGetDeclContext(void *opaque_decl)
Definition: TypeSystem.cpp:135
virtual CompilerType GetFullyUnqualifiedType(lldb::opaque_compiler_type_t type)=0
A section + offset based address class.
Definition: Address.h:80
virtual CompilerType GetFunctionReturnType(lldb::opaque_compiler_type_t type)=0
virtual llvm::Optional< CompilerType::IntegralTemplateArgument > GetIntegralTemplateArgument(lldb::opaque_compiler_type_t type, size_t idx)
Definition: TypeSystem.cpp:118
virtual bool DumpTypeValue(lldb::opaque_compiler_type_t type, Stream *s, lldb::Format format, const DataExtractor &data, lldb::offset_t data_offset, size_t data_byte_size, uint32_t bitfield_bit_size, uint32_t bitfield_bit_offset, ExecutionContextScope *exe_scope)=0
virtual TypeMemberFunctionImpl GetMemberFunctionAtIndex(lldb::opaque_compiler_type_t type, size_t idx)=0
virtual int GetFunctionArgumentCount(lldb::opaque_compiler_type_t type)=0
virtual bool IsPointerType(lldb::opaque_compiler_type_t type, CompilerType *pointee_type)=0
virtual PersistentExpressionState * GetPersistentExpressionState()
Definition: TypeSystem.h:452
virtual bool IsRuntimeGeneratedType(lldb::opaque_compiler_type_t type)=0
virtual unsigned GetTypeQualifiers(lldb::opaque_compiler_type_t type)=0
virtual FunctionCaller * GetFunctionCaller(const CompilerType &return_type, const Address &function_address, const ValueList &arg_value_list, const char *name)
Definition: TypeSystem.h:440
const LLVMCastKind m_kind
Definition: TypeSystem.h:475
virtual lldb::LanguageType GetMinimumLanguage(lldb::opaque_compiler_type_t type)=0
virtual bool IsConst(lldb::opaque_compiler_type_t type)=0
virtual void Finalize()
Definition: TypeSystem.h:86
virtual CompilerType AddRestrictModifier(lldb::opaque_compiler_type_t type)
Definition: TypeSystem.cpp:85
virtual bool IsBeingDefined(lldb::opaque_compiler_type_t type)=0
virtual bool IsTypedefType(lldb::opaque_compiler_type_t type)=0
virtual CompilerType AddConstModifier(lldb::opaque_compiler_type_t type)
Definition: TypeSystem.cpp:75
virtual DWARFASTParser * GetDWARFParser()
Definition: TypeSystem.h:88
A uniqued constant string class.
Definition: ConstString.h:38
virtual CompilerType GetArrayElementType(lldb::opaque_compiler_type_t type, uint64_t *stride)=0
virtual CompilerType CreateTypedef(lldb::opaque_compiler_type_t type, const char *name, const CompilerDeclContext &decl_ctx)
Definition: TypeSystem.cpp:89
virtual CompilerType GetDirectBaseClassAtIndex(lldb::opaque_compiler_type_t type, size_t idx, uint32_t *bit_offset_ptr)=0
virtual bool IsIntegerType(lldb::opaque_compiler_type_t type, bool &is_signed)=0
virtual ConstString DeclGetMangledName(void *opaque_decl)
Definition: TypeSystem.cpp:131
virtual bool IsPolymorphicClass(lldb::opaque_compiler_type_t type)=0
virtual bool IsArrayType(lldb::opaque_compiler_type_t type, CompilerType *element_type, uint64_t *size, bool *is_incomplete)=0
virtual size_t DeclGetFunctionNumArguments(void *opaque_decl)
Definition: TypeSystem.cpp:143
virtual uint32_t GetPointerByteSize()=0
virtual llvm::Optional< uint64_t > GetBitSize(lldb::opaque_compiler_type_t type, ExecutionContextScope *exe_scope)=0
virtual CompilerType GetPointerType(lldb::opaque_compiler_type_t type)=0
virtual CompilerType GetTypeTemplateArgument(lldb::opaque_compiler_type_t type, size_t idx)
Definition: TypeSystem.cpp:112
virtual size_t GetIndexOfChildMemberWithName(lldb::opaque_compiler_type_t type, const char *name, bool omit_empty_base_classes, std::vector< uint32_t > &child_indexes)=0
"lldb/Expression/UtilityFunction.h" Encapsulates a bit of source code that provides a function that i...
virtual bool IsFunctionPointerType(lldb::opaque_compiler_type_t type)=0
virtual CompilerType GetFunctionArgumentAtIndex(lldb::opaque_compiler_type_t type, const size_t index)=0
std::map< lldb::LanguageType, lldb::TypeSystemSP > collection
Definition: TypeSystem.h:504
virtual size_t GetTypeBitAlign(lldb::opaque_compiler_type_t type)=0
virtual CompilerType GetRValueReferenceType(lldb::opaque_compiler_type_t type)
Definition: TypeSystem.cpp:71
virtual std::vector< CompilerDecl > DeclContextFindDeclByName(void *opaque_decl_ctx, ConstString name, const bool ignore_imported_decls)
Definition: TypeSystem.cpp:151
virtual CompilerType GetBuiltinTypeByName(ConstString name)
Definition: TypeSystem.cpp:95
std::mutex m_mutex
A mutex to keep this object happy in multi-threaded environments.
Definition: TypeSystem.h:505
virtual size_t GetNumMemberFunctions(lldb::opaque_compiler_type_t type)=0
virtual size_t GetNumTemplateArguments(lldb::opaque_compiler_type_t type)
Definition: TypeSystem.cpp:103
virtual LazyBool ShouldPrintAsOneLiner(void *type, ValueObject *valobj)
Definition: TypeSystem.cpp:123
virtual CompilerType GetFieldAtIndex(lldb::opaque_compiler_type_t type, size_t idx, std::string &name, uint64_t *bit_offset_ptr, uint32_t *bitfield_bit_size_ptr, bool *is_bitfield_ptr)=0
virtual bool IsVoidType(lldb::opaque_compiler_type_t type)=0
virtual bool SupportsLanguage(lldb::LanguageType language)=0