This is the first phase of supporting the DW_AT_object_pointer tag.  I expanded the decl metadata
so it could hold this information, and then used it to look up unfound names in the object pointer
if it exists.  This gets "frame var" to work for unqualified references to ivars captured in blocks.
But the expression parser is ignoring this information still.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@166860 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Symbol/ClangExternalASTSourceCommon.cpp b/source/Symbol/ClangExternalASTSourceCommon.cpp
index 85e1dc8..0e00e40 100644
--- a/source/Symbol/ClangExternalASTSourceCommon.cpp
+++ b/source/Symbol/ClangExternalASTSourceCommon.cpp
@@ -27,14 +27,19 @@
     g_TotalSizeOfMetadata -= m_metadata.size();
 }
 
-uint64_t ClangExternalASTSourceCommon::GetMetadata (uintptr_t object)
+ClangASTMetadata *
+ClangExternalASTSourceCommon::GetMetadata (uintptr_t object)
 {
     assert (m_magic == ClangExternalASTSourceCommon_MAGIC);
     
-    return m_metadata[object];
+    if (HasMetadata (object))
+        return &m_metadata[object];
+    else
+        return NULL;
 }
 
-void ClangExternalASTSourceCommon::SetMetadata (uintptr_t object, uint64_t metadata)
+void
+ClangExternalASTSourceCommon::SetMetadata (uintptr_t object, ClangASTMetadata &metadata)
 {
     assert (m_magic == ClangExternalASTSourceCommon_MAGIC);
     
@@ -44,7 +49,8 @@
     g_TotalSizeOfMetadata += (new_size - orig_size);
 }
 
-bool ClangExternalASTSourceCommon::HasMetadata (uintptr_t object)
+bool
+ClangExternalASTSourceCommon::HasMetadata (uintptr_t object)
 {
     assert (m_magic == ClangExternalASTSourceCommon_MAGIC);