Updated LLVM to take a new MC JIT that supports
allocations by section.  We install these sections
in the target process and inform the JIT of their
new locations.

Also removed some unused variable warnings.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@151789 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Expression/ClangExpressionParser.cpp b/source/Expression/ClangExpressionParser.cpp
index fe1a6ac..3119146 100644
--- a/source/Expression/ClangExpressionParser.cpp
+++ b/source/Expression/ClangExpressionParser.cpp
@@ -363,7 +363,7 @@
     diag_buf->FlushDiagnostics (m_compiler->getDiagnostics());
     
     MemoryBuffer *memory_buffer = MemoryBuffer::getMemBufferCopy(m_expr.Text(), __FUNCTION__);
-    FileID memory_buffer_file_id = m_compiler->getSourceManager().createMainFileIDForMemBuffer (memory_buffer);
+    m_compiler->getSourceManager().createMainFileIDForMemBuffer (memory_buffer);
     
     diag_buf->BeginSourceFile(m_compiler->getLangOpts(), &m_compiler->getPreprocessor());
     
@@ -626,6 +626,7 @@
     }
         
     jit_memory_manager->CommitAllocations(*process);
+    jit_memory_manager->ReportAllocations(*execution_engine);
     jit_memory_manager->WriteData(*process);
     
     std::vector<JittedFunction>::iterator pos, end = m_jitted_functions.end();
diff --git a/source/Expression/ClangUserExpression.cpp b/source/Expression/ClangUserExpression.cpp
index 7a2541d..664854f 100644
--- a/source/Expression/ClangUserExpression.cpp
+++ b/source/Expression/ClangUserExpression.cpp
@@ -156,17 +156,6 @@
             
             m_cplusplus = true;
             m_needs_object_ptr = true;
-            
-            do {
-                clang::QualType this_type = method_decl->getThisType(decl_context->getParentASTContext());
-
-                const clang::PointerType *this_pointer_type = this_type->getAs<clang::PointerType>();
-
-                if (!this_pointer_type)
-                    break;
-                
-                clang::QualType this_pointee_type = this_pointer_type->getPointeeType();
-            } while (0);
         }
     }
     else if (clang::ObjCMethodDecl *method_decl = llvm::dyn_cast<clang::ObjCMethodDecl>(decl_context))
diff --git a/source/Expression/RecordingMemoryManager.cpp b/source/Expression/RecordingMemoryManager.cpp
index 3d0cda3..5b9e33f 100644
--- a/source/Expression/RecordingMemoryManager.cpp
+++ b/source/Expression/RecordingMemoryManager.cpp
@@ -10,6 +10,7 @@
 // C Includes
 // C++ Includes
 // Other libraries and framework includes
+#include "llvm/ExecutionEngine/ExecutionEngine.h"
 // Project includes
 #include "lldb/Expression/RecordingMemoryManager.h"
 
@@ -276,6 +277,20 @@
     return ret;
 }
 
+void
+RecordingMemoryManager::ReportAllocations (llvm::ExecutionEngine &engine)
+{
+    for (AllocationList::iterator ai = m_allocations.begin(), ae = m_allocations.end();
+         ai != ae;
+         ++ai)
+    {
+        if (!ai->m_allocated)
+            continue;
+        
+        engine.mapSectionAddress((void*)ai->m_local_start, ai->m_remote_start);
+    }
+}
+
 bool
 RecordingMemoryManager::WriteData (Process &process)
 {