[Lldb-commits] [lldb] r169655 - in /lldb/trunk: include/lldb/API/SBType.h scripts/Python/interface/SBType.i source/API/SBType.cpp

Greg Clayton gclayton at apple.com
Fri Dec 7 16:17:08 PST 2012


Author: gclayton
Date: Fri Dec  7 18:17:07 2012
New Revision: 169655

URL: http://llvm.org/viewvc/llvm-project?rev=169655&view=rev
Log:
Added GetCanonicalType() to SBType:

lldb::SBType
SBType::GetCanonicalType();


Modified:
    lldb/trunk/include/lldb/API/SBType.h
    lldb/trunk/scripts/Python/interface/SBType.i
    lldb/trunk/source/API/SBType.cpp

Modified: lldb/trunk/include/lldb/API/SBType.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBType.h?rev=169655&r1=169654&r2=169655&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBType.h (original)
+++ lldb/trunk/include/lldb/API/SBType.h Fri Dec  7 18:17:07 2012
@@ -108,6 +108,8 @@
     lldb::SBType
     GetUnqualifiedType();
 
+    lldb::SBType
+    GetCanonicalType();
     // Get the "lldb::BasicType" enumeration for a type. If a type is not a basic
     // type eBasicTypeInvalid will be returned
     lldb::BasicType

Modified: lldb/trunk/scripts/Python/interface/SBType.i
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/Python/interface/SBType.i?rev=169655&r1=169654&r2=169655&view=diff
==============================================================================
--- lldb/trunk/scripts/Python/interface/SBType.i (original)
+++ lldb/trunk/scripts/Python/interface/SBType.i Fri Dec  7 18:17:07 2012
@@ -180,6 +180,9 @@
     lldb::SBType
     GetUnqualifiedType();
     
+    lldb::SBType
+    GetCanonicalType();
+
     lldb::BasicType
     GetBasicType();
 

Modified: lldb/trunk/source/API/SBType.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBType.cpp?rev=169655&r1=169654&r2=169655&view=diff
==============================================================================
--- lldb/trunk/source/API/SBType.cpp (original)
+++ lldb/trunk/source/API/SBType.cpp Fri Dec  7 18:17:07 2012
@@ -274,6 +274,18 @@
     return SBType(ClangASTType(m_opaque_sp->GetASTContext(),qt.getUnqualifiedType().getAsOpaquePtr()));
 }
 
+lldb::SBType
+SBType::GetCanonicalType()
+{
+    if (IsValid())
+    {
+        QualType qt (QualType::getFromOpaquePtr(m_opaque_sp->GetOpaqueQualType()));
+        return SBType(ClangASTType(m_opaque_sp->GetASTContext(),qt.getCanonicalType().getAsOpaquePtr()));
+    }
+    return SBType();
+}
+
+
 lldb::BasicType
 SBType::GetBasicType()
 {





More information about the lldb-commits mailing list