Fixed a bug that was confusing the code generator

on i386 platforms, leading to crashes on simple
expressions.

llvm-svn: 118114
This commit is contained in:
Sean Callanan 2010-11-02 23:20:00 +00:00
parent c0a8bee4b0
commit c2afd25ea1
1 changed files with 2 additions and 6 deletions

View File

@ -471,9 +471,7 @@ ClangExpressionParser::MakeJIT (lldb::addr_t &func_addr,
m_jit_mm = new RecordingMemoryManager();
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,
@ -482,9 +480,7 @@ ClangExpressionParser::MakeJIT (lldb::addr_t &func_addr,
CodeGenOpt::Less,
true,
CodeModel::Small));
llvm::TargetMachine::setRelocationModel(relocation_model);
if (!m_execution_engine.get())
{
err.SetErrorToGenericError();