Fixed an issue in the DWARF parser that was causing forward declarations
to not get resolved.

Fixed the "void **isa_ptr" variable inside the objective C verifier to start
with a '$' character so we don't go looking for it in our program.

Moved the lookup for "$__lldb_class" into the part that knows we are looking
for internal types that start with a '$'.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@118488 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Expression/ClangExpressionDeclMap.cpp b/source/Expression/ClangExpressionDeclMap.cpp
index 9dd2ea2..224fbac 100644
--- a/source/Expression/ClangExpressionDeclMap.cpp
+++ b/source/Expression/ClangExpressionDeclMap.cpp
@@ -970,45 +970,6 @@
     if (m_exe_ctx.frame == NULL)
         return;
         
-    static ConstString g_lldb_class_name ("$__lldb_class");
-    if (name == g_lldb_class_name)
-    {
-        // Clang is looking for the type of "this"
-        
-        VariableList *vars = m_exe_ctx.frame->GetVariableList(false);
-        
-        if (!vars)
-            return;
-        
-        lldb::VariableSP this_var = vars->FindVariable(ConstString("this"));
-        
-        if (!this_var)
-            return;
-        
-        Type *this_type = this_var->GetType();
-        
-        if (!this_type)
-            return;
-        
-        TypeFromUser this_user_type(this_type->GetClangType(),
-                                    this_type->GetClangAST());
-        
-        m_object_pointer_type = this_user_type;
-        
-        void *pointer_target_type;
-        
-        if (!ClangASTContext::IsPointerType(this_user_type.GetOpaqueQualType(),
-                                            &pointer_target_type))
-            return;
-        
-        TypeFromUser class_user_type(pointer_target_type,
-                                     this_type->GetClangAST());
-
-        AddOneType(context, class_user_type, true);
-        
-        return;
-    }
-    
     SymbolContextList sym_ctxs;
     
     // Only look for functions by name out in our symbols if the function 
@@ -1066,6 +1027,45 @@
     }
     else
     {
+        static ConstString g_lldb_class_name ("$__lldb_class");
+        if (name == g_lldb_class_name)
+        {
+            // Clang is looking for the type of "this"
+            
+            VariableList *vars = m_exe_ctx.frame->GetVariableList(false);
+            
+            if (!vars)
+                return;
+            
+            lldb::VariableSP this_var = vars->FindVariable(ConstString("this"));
+            
+            if (!this_var)
+                return;
+            
+            Type *this_type = this_var->GetType();
+            
+            if (!this_type)
+                return;
+            
+            TypeFromUser this_user_type(this_type->GetClangType(),
+                                        this_type->GetClangAST());
+            
+            m_object_pointer_type = this_user_type;
+            
+            void *pointer_target_type;
+            
+            if (!ClangASTContext::IsPointerType(this_user_type.GetOpaqueQualType(),
+                                                &pointer_target_type))
+                return;
+            
+            TypeFromUser class_user_type(pointer_target_type,
+                                         this_type->GetClangAST());
+
+            AddOneType(context, class_user_type, true);
+            
+            return;
+        }
+        
         ClangExpressionVariable *pvar(m_persistent_vars->GetVariable(name));
     
         if (pvar)