[Lldb-commits] [lldb] [LLDB] Add more helper functions to CompilerType class (second try). (PR #73472)
via lldb-commits
lldb-commits at lists.llvm.org
Tue Dec 5 07:27:23 PST 2023
================
@@ -194,6 +192,54 @@ class CompilerType {
bool IsTypedefType() const;
bool IsVoidType() const;
+
+ bool IsSmartPtrType() const;
+
+ bool IsInteger() const;
+
+ bool IsFloat() const;
+
+ bool IsEnumerationType() const;
+
+ bool IsUnscopedEnumerationType() const;
+
+ bool IsIntegerOrUnscopedEnumerationType() const;
+
+ bool IsSigned() const;
+
+ bool IsNullPtrType() const;
+
+ bool IsBoolean() const;
+
+ bool IsEnumerationIntegerTypeSigned() const;
+
+ bool IsScalarOrUnscopedEnumerationType() const;
+
+ bool IsPromotableIntegerType() const;
+
+ bool IsPointerToVoid() const;
+
+ bool IsRecordType() const;
+
+ bool IsVirtualBase(CompilerType target_base, CompilerType *virtual_base,
+ bool carry_virtual = false) const;
+
+ bool IsContextuallyConvertibleToBool() const;
+
+ bool IsBasicType() const;
+
+ std::string TypeDescription();
+
+ bool CompareTypes(CompilerType rhs) const;
+
+ const char *GetTypeTag();
+
+ uint32_t GetNumberOfNonEmptyBaseClasses();
+
+ CompilerType GetTemplateArgumentType(uint32_t idx);
+
+ CompilerType GetSmartPtrPointeeType();
----------------
cmtice wrote:
I looked at the functions in LibcxxSharedPtrSyntheticFrontend (iPlugins/Language/CPlusPlus) -- I assume this is what you were referring to. None of the functions there do exactly what this function does, so I can't use one of them instead. The only place I saw there that might be able to use this function was in GetChildAtIndex... I could replace 'valobj_sp->GetCompilerType().GetTypeTemplateArgument(0).GetPointerType()' with 'valobj_sp->GetCompilerType().GetSmartPtrPointeeType()', but it looks like the current call would return something like "* FooType", whereas my call would return "FooType", so they're not quite the same, either.
So I don't see how to do what you're asking.
https://github.com/llvm/llvm-project/pull/73472
More information about the lldb-commits
mailing list