Skip to content

Commit 3c721b9

Browse files
committed
Revert "[lldb] Fix evaluation of expressions with static initializers (#89063)"
It breaks expression evaluation on arm, and the x86 breakage has been fixed in 6cea7c4. This reverts commit 915c84b.
1 parent 42348b6 commit 3c721b9

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

lldb/source/Expression/IRExecutionUnit.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
#include "llvm/IR/DiagnosticInfo.h"
1414
#include "llvm/IR/LLVMContext.h"
1515
#include "llvm/IR/Module.h"
16-
#include "llvm/Support/CodeGen.h"
1716
#include "llvm/Support/SourceMgr.h"
1817
#include "llvm/Support/raw_ostream.h"
1918

@@ -280,13 +279,10 @@ void IRExecutionUnit::GetRunnableInfo(Status &error, lldb::addr_t &func_addr,
280279
llvm::EngineBuilder builder(std::move(m_module_up));
281280
llvm::Triple triple(m_module->getTargetTriple());
282281

283-
// PIC needed for ELF to avoid generating 32-bit relocations (which overflow
284-
// if the object is loaded into high memory).
285-
bool want_pic = triple.isOSBinFormatMachO() || triple.isOSBinFormatELF();
286-
287282
builder.setEngineKind(llvm::EngineKind::JIT)
288283
.setErrorStr(&error_string)
289-
.setRelocationModel(want_pic ? llvm::Reloc::PIC_ : llvm::Reloc::Static)
284+
.setRelocationModel(triple.isOSBinFormatMachO() ? llvm::Reloc::PIC_
285+
: llvm::Reloc::Static)
290286
.setMCJITMemoryManager(std::make_unique<MemoryManager>(*this))
291287
.setOptLevel(llvm::CodeGenOptLevel::Less);
292288

0 commit comments

Comments
 (0)