================ @@ -302,6 +302,195 @@ bool CompilerType::IsBeingDefined() const { return false; } +bool CompilerType::IsInteger() const { + bool is_signed = false; // May be reset by the call below. + return IsIntegerType(is_signed); +} + +bool CompilerType::IsFloat() const { + uint32_t count = 0; + bool is_complex = false; + return IsFloatingPointType(count, is_complex); +} + +bool CompilerType::IsEnumerationType() const { + bool is_signed = false; // May be reset by the call below. + return IsEnumerationType(is_signed); +} + +bool CompilerType::IsUnscopedEnumerationType() const { + return IsEnumerationType() && !IsScopedEnumerationType(); +} + +bool CompilerType::IsIntegerOrUnscopedEnumerationType() const { + return IsInteger() || IsUnscopedEnumerationType(); +} + +bool CompilerType::IsSigned() const { + if (IsEnumerationType()) + return IsEnumerationIntegerTypeSigned(); + + return GetTypeInfo() & lldb::eTypeIsSigned; ---------------- cmtice wrote:
@adrian-prantl Actually I think it already works properly without special-casing enums (I went back and looked and could not figure out why I had done this). I've cleaned it up now and removed the special casing. Are you OK with me committing this now? https://github.com/llvm/llvm-project/pull/73472 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits