This commit integrates support for the LLVM MCJIT
into the mainline LLDB codebase.  MCJIT introduces
API improvements and better architectural support.

This commit adds a new subsystem, the
ProcessDataAllocator, which is responsible for
performing static data allocations on behalf of the
IR transformer.  MCJIT currently does not support
the relocations required to store the constant pool
in the same allocation as the function body, so we
allocate a heap region separately and redirect
static data references from the expression to that
heap region in a new IR modification pass.

This patch also fixes bugs in the IR
transformations that were exposed by the transition
to the MCJIT.  Finally, the patch also pulls in a
more recent revision of LLVM so that the MCJIT is
available for use.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@131923 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Expression/ClangExpressionParser.cpp b/source/Expression/ClangExpressionParser.cpp
index 1ce39e8..255013e 100644
--- a/source/Expression/ClangExpressionParser.cpp
+++ b/source/Expression/ClangExpressionParser.cpp
@@ -19,7 +19,6 @@
 #include "lldb/Expression/ClangExpression.h"
 #include "lldb/Expression/ClangExpressionDeclMap.h"
 #include "lldb/Expression/IRDynamicChecks.h"
-#include "lldb/Expression/IRForTarget.h"
 #include "lldb/Expression/IRToDWARF.h"
 #include "lldb/Expression/RecordingMemoryManager.h"
 #include "lldb/Target/ExecutionContext.h"
@@ -53,7 +52,7 @@
 #include "llvm/ADT/StringRef.h"
 #include "llvm/ExecutionEngine/ExecutionEngine.h"
 
-#define USE_STANDARD_JIT
+//#define USE_STANDARD_JIT
 #if defined (USE_STANDARD_JIT)
 #include "llvm/ExecutionEngine/JIT.h"
 #else
@@ -472,6 +471,7 @@
                                 lldb::addr_t &func_addr, 
                                 lldb::addr_t &func_end, 
                                 ExecutionContext &exe_ctx,
+                                IRForTarget::StaticDataAllocator *data_allocator,
                                 lldb::ClangExpressionVariableSP &const_result,
                                 bool jit_only_if_needed)
 {
@@ -519,6 +519,7 @@
         IRForTarget ir_for_target(decl_map, 
                                   m_expr.NeedsVariableResolution(),
                                   const_result,
+                                  data_allocator,
                                   error_stream,
                                   function_name.c_str());