I have brought LLDB up-to-date with top of tree
LLVM/Clang.  This brings in several fixes, including:

- Improvements in the Just-In-Time compiler's
  allocation of memory: the JIT now allocates
  memory in chunks of sections, improving its
  ability to generate relocations.  I have
  revamped the RecordingMemoryManager to reflect
  these changes, as well as to get the memory
  allocation and data copying out fo the
  ClangExpressionParser code.  Jim Grosbach wrote
  the updates to the JIT on the LLVM side.

- A new ExternalASTSource interface to allow LLDB to
  report accurate structure layout information to
  Clang.  Previously we could only report the sizes
  of fields, not their offsets.  This meant that if
  data structures included field alignment
  directives, we could not communicate the necessary
  alignment to Clang and accesses to the data would
  fail.  Now we can (and I have update the relevant
  test case).  Thanks to Doug Gregor for implementing
  the Clang side of this fix.

- The way Objective-C interfaces are completed by
  Clang has been made consistent with RecordDecls;
  with help from Doug Gregor and Greg Clayton I have
  ensured that this still works.

- I have eliminated all local LLVM and Clang patches,
  committing the ones that are still relevant to LLVM
  and Clang as needed.

I have tested the changes extensively locally, but
please let me know if they cause any trouble for you.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@149775 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Expression/ClangExpressionDeclMap.cpp b/source/Expression/ClangExpressionDeclMap.cpp
index 128db9c..19c3c0e 100644
--- a/source/Expression/ClangExpressionDeclMap.cpp
+++ b/source/Expression/ClangExpressionDeclMap.cpp
@@ -415,7 +415,8 @@
         const size_t pvar_byte_size = pvar_sp->GetByteSize();
         uint8_t *pvar_data = pvar_sp->GetValueBytes();
         
-        ReadTarget(pvar_data, value, pvar_byte_size);
+        if (!ReadTarget(pvar_data, value, pvar_byte_size))
+            return false;
         
         pvar_sp->m_flags &= ~(ClangExpressionVariable::EVNeedsFreezeDry);
     }
@@ -425,6 +426,16 @@
     return true;
 }
 
+void
+ClangExpressionDeclMap::RemoveResultVariable
+(
+    const ConstString &name
+)
+{
+    ClangExpressionVariableSP pvar_sp = m_parser_vars->m_persistent_vars->GetVariable(name);
+    m_parser_vars->m_persistent_vars->RemovePersistentVariable(pvar_sp);
+}
+
 bool 
 ClangExpressionDeclMap::AddPersistentVariable 
 (
@@ -2322,6 +2333,12 @@
     if (name_unique_cstr == NULL)
         return;
     
+    static ConstString id_name("id");
+    static ConstString Class_name("Class");
+    
+    if (name == id_name || name == Class_name)
+        return;
+    
     // Only look for functions by name out in our symbols if the function 
     // doesn't start with our phony prefix of '$'
     Target *target = m_parser_vars->m_exe_ctx->GetTargetPtr();