bool
IsReferenceType();
+ bool
+ IsFunctionType ();
+
lldb::SBType
GetPointerType();
lldb::TemplateArgumentKind
GetTemplateArgumentKind (uint32_t idx);
+ lldb::SBType
+ GetFunctionReturnType ();
+
+ lldb::SBTypeList
+ GetFunctionArgumentTypes ();
+
const char*
GetName();
bool
IsReferenceType();
+
+ bool
+ IsFunctionType ();
lldb::SBType
GetPointerType();
lldb::TemplateArgumentKind
GetTemplateArgumentKind (uint32_t idx);
+ lldb::SBType
+ GetFunctionReturnType ();
+
+ lldb::SBTypeList
+ GetFunctionArgumentTypes ();
+
bool
IsTypeComplete ();
__swig_getmethods__["is_reference"] = IsReferenceType
if _newclass: is_reference = property(IsReferenceType, None, doc='''A read only property that returns a boolean value that indicates if this type is a reference type.''')
-
+
+ __swig_getmethods__["is_function"] = IsFunctionType
+ if _newclass: is_reference = property(IsReferenceType, None, doc='''A read only property that returns a boolean value that indicates if this type is a function type.''')
+
__swig_getmethods__["num_fields"] = GetNumberOfFields
if _newclass: num_fields = property(GetNumberOfFields, None, doc='''A read only property that returns number of fields in this type as an integer.''')
return SBType(ClangASTType(m_opaque_sp->GetASTContext(),qt.getNonReferenceType().getAsOpaquePtr()));
}
+bool
+SBType::IsFunctionType ()
+{
+ if (IsValid())
+ {
+ QualType qual_type(QualType::getFromOpaquePtr(m_opaque_sp->GetOpaqueQualType()));
+ const FunctionProtoType* func = dyn_cast<FunctionProtoType>(qual_type.getTypePtr());
+ return func != NULL;
+ }
+ return false;
+}
+
+lldb::SBType
+SBType::GetFunctionReturnType ()
+{
+ if (IsValid())
+ {
+ QualType qual_type(QualType::getFromOpaquePtr(m_opaque_sp->GetOpaqueQualType()));
+ const FunctionProtoType* func = dyn_cast<FunctionProtoType>(qual_type.getTypePtr());
+
+ if (func)
+ return SBType(ClangASTType(m_opaque_sp->GetASTContext(),
+ func->getResultType().getAsOpaquePtr()));
+ }
+ return lldb::SBType();
+}
+
+lldb::SBTypeList
+SBType::GetFunctionArgumentTypes ()
+{
+ SBTypeList sb_type_list;
+ if (IsValid())
+ {
+ QualType qual_type(QualType::getFromOpaquePtr(m_opaque_sp->GetOpaqueQualType()));
+ const FunctionProtoType* func = dyn_cast<FunctionProtoType>(qual_type.getTypePtr());
+ if (func)
+ {
+ const uint32_t num_args = func->getNumArgs();
+ for (uint32_t i=0; i<num_args; ++i)
+ sb_type_list.Append (SBType(ClangASTType(m_opaque_sp->GetASTContext(), func->getArgType(i).getAsOpaquePtr())));
+ }
+ }
+ return sb_type_list;
+}
+
lldb::SBType
SBType::GetUnqualifiedType()
{