summaryrefslogtreecommitdiffstats
path: root/lldb/source/Expression
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Expression')
-rw-r--r--lldb/source/Expression/ClangExpressionParser.cpp3
-rw-r--r--lldb/source/Expression/ClangUserExpression.cpp11
-rw-r--r--lldb/source/Expression/RecordingMemoryManager.cpp15
3 files changed, 17 insertions, 12 deletions
diff --git a/lldb/source/Expression/ClangExpressionParser.cpp b/lldb/source/Expression/ClangExpressionParser.cpp
index fe1a6ac923d..311914649ca 100644
--- a/lldb/source/Expression/ClangExpressionParser.cpp
+++ b/lldb/source/Expression/ClangExpressionParser.cpp
@@ -363,7 +363,7 @@ ClangExpressionParser::Parse (Stream &stream)
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 @@ ClangExpressionParser::PrepareForExecution (lldb::addr_t &func_allocation_addr,
}
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/lldb/source/Expression/ClangUserExpression.cpp b/lldb/source/Expression/ClangUserExpression.cpp
index 7a2541d9173..664854f1fac 100644
--- a/lldb/source/Expression/ClangUserExpression.cpp
+++ b/lldb/source/Expression/ClangUserExpression.cpp
@@ -156,17 +156,6 @@ ClangUserExpression::ScanContext(ExecutionContext &exe_ctx, Error &err)
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/lldb/source/Expression/RecordingMemoryManager.cpp b/lldb/source/Expression/RecordingMemoryManager.cpp
index 3d0cda32745..5b9e33f79c7 100644
--- a/lldb/source/Expression/RecordingMemoryManager.cpp
+++ b/lldb/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 @@ RecordingMemoryManager::CommitAllocations (Process &process)
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)
{
OpenPOWER on IntegriCloud