diff options
author | Sean Callanan <scallanan@apple.com> | 2010-11-02 23:20:00 +0000 |
---|---|---|
committer | Sean Callanan <scallanan@apple.com> | 2010-11-02 23:20:00 +0000 |
commit | c2afd25ea14ffd24fa44f40d14b65f00386013a6 (patch) | |
tree | 4347a9a33283d82aff49592e4b221f803827c7d7 /lldb/source/Expression/ClangExpressionParser.cpp | |
parent | c0a8bee4b02f5b54ceff2b90950659a66d195697 (diff) | |
download | bcm5719-llvm-c2afd25ea14ffd24fa44f40d14b65f00386013a6.tar.gz bcm5719-llvm-c2afd25ea14ffd24fa44f40d14b65f00386013a6.zip |
Fixed a bug that was confusing the code generator
on i386 platforms, leading to crashes on simple
expressions.
llvm-svn: 118114
Diffstat (limited to 'lldb/source/Expression/ClangExpressionParser.cpp')
-rw-r--r-- | lldb/source/Expression/ClangExpressionParser.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/lldb/source/Expression/ClangExpressionParser.cpp b/lldb/source/Expression/ClangExpressionParser.cpp index a2385c8149d..97d54a89e0f 100644 --- a/lldb/source/Expression/ClangExpressionParser.cpp +++ b/lldb/source/Expression/ClangExpressionParser.cpp @@ -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(); |