aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Expression/IRExecutionUnit.cpp
diff options
context:
space:
mode:
authorPavel Labath <pavel@labath.sk>2024-04-18 06:45:50 +0000
committerPavel Labath <pavel@labath.sk>2024-04-18 07:30:18 +0000
commit3c721b90d363bf73b78467f6e86c879235bac1b2 (patch)
tree2cd9c34c6746b9addb23b53f1f70381977a3b29f /lldb/source/Expression/IRExecutionUnit.cpp
parent42348b6918e9bbf2dd0260d8ffab4b80b8ff08f8 (diff)
downloadllvm-3c721b90d363bf73b78467f6e86c879235bac1b2.tar.gz
llvm-3c721b90d363bf73b78467f6e86c879235bac1b2.tar.bz2
llvm-3c721b90d363bf73b78467f6e86c879235bac1b2.zip
Revert "[lldb] Fix evaluation of expressions with static initializers (#89063)"
It breaks expression evaluation on arm, and the x86 breakage has been fixed in 6cea7c491f4c4c68aa0494a9b18f36ff40c22c81. This reverts commit 915c84b1480bb3c6d2e44ca83822d2c2304b763a.
Diffstat (limited to 'lldb/source/Expression/IRExecutionUnit.cpp')
-rw-r--r--lldb/source/Expression/IRExecutionUnit.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/lldb/source/Expression/IRExecutionUnit.cpp b/lldb/source/Expression/IRExecutionUnit.cpp
index 7ad0e5ff22b2..cb9bee8733e1 100644
--- a/lldb/source/Expression/IRExecutionUnit.cpp
+++ b/lldb/source/Expression/IRExecutionUnit.cpp
@@ -13,7 +13,6 @@
#include "llvm/IR/DiagnosticInfo.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/IR/Module.h"
-#include "llvm/Support/CodeGen.h"
#include "llvm/Support/SourceMgr.h"
#include "llvm/Support/raw_ostream.h"
@@ -280,13 +279,10 @@ void IRExecutionUnit::GetRunnableInfo(Status &error, lldb::addr_t &func_addr,
llvm::EngineBuilder builder(std::move(m_module_up));
llvm::Triple triple(m_module->getTargetTriple());
- // PIC needed for ELF to avoid generating 32-bit relocations (which overflow
- // if the object is loaded into high memory).
- bool want_pic = triple.isOSBinFormatMachO() || triple.isOSBinFormatELF();
-
builder.setEngineKind(llvm::EngineKind::JIT)
.setErrorStr(&error_string)
- .setRelocationModel(want_pic ? llvm::Reloc::PIC_ : llvm::Reloc::Static)
+ .setRelocationModel(triple.isOSBinFormatMachO() ? llvm::Reloc::PIC_
+ : llvm::Reloc::Static)
.setMCJITMemoryManager(std::make_unique<MemoryManager>(*this))
.setOptLevel(llvm::CodeGenOptLevel::Less);