Fixed a problem where function calls on i386 weren't
being generated correctly.
Also added a messy way to single-step through expressions
that I will improve soon.
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@117342 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Expression/ClangExpressionParser.cpp b/source/Expression/ClangExpressionParser.cpp
index 94c1c01..d0f276c 100644
--- a/source/Expression/ClangExpressionParser.cpp
+++ b/source/Expression/ClangExpressionParser.cpp
@@ -467,13 +467,19 @@
std::string error_string;
+ llvm::Reloc::Model relocation_model = llvm::TargetMachine::getRelocationModel();
+
+ llvm::TargetMachine::setRelocationModel(llvm::Reloc::PIC_);
+
m_execution_engine.reset(llvm::ExecutionEngine::createJIT (module,
&error_string,
m_jit_mm,
- CodeGenOpt::Default,
+ CodeGenOpt::Less,
true,
CodeModel::Small));
+ llvm::TargetMachine::setRelocationModel(relocation_model);
+
if (!m_execution_engine.get())
{
err.SetErrorToGenericError();