Skip to content

Commit

Permalink
Revert "[clang-repl] Enable debugging of JIT-ed code."
Browse files Browse the repository at this point in the history
This reverts commit 1e4891e.

Some bots complain about undefined llvm_orc_registerJITLoaderGDBAllocAction.
  • Loading branch information
vgvassilev committed Apr 18, 2023
1 parent b3c696f commit e64fbf2
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions clang/lib/Interpreter/IncrementalExecutor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,11 @@
#include "llvm/ExecutionEngine/Orc/IRCompileLayer.h"
#include "llvm/ExecutionEngine/Orc/LLJIT.h"
#include "llvm/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.h"
#include "llvm/ExecutionEngine/Orc/TargetProcess/JITLoaderGDB.h"
#include "llvm/ExecutionEngine/SectionMemoryManager.h"
#include "llvm/IR/Module.h"
#include "llvm/Support/ManagedStatic.h"
#include "llvm/Support/TargetSelect.h"

// Force linking some of the runtimes that helps attaching to a debugger.
LLVM_ATTRIBUTE_USED void linkComponents() {
llvm::errs() << (void *)&llvm_orc_registerJITLoaderGDBWrapper
<< (void *)&llvm_orc_registerJITLoaderGDBAllocAction;
}

namespace clang {

IncrementalExecutor::IncrementalExecutor(llvm::orc::ThreadSafeContext &TSC,
Expand All @@ -44,12 +37,7 @@ IncrementalExecutor::IncrementalExecutor(llvm::orc::ThreadSafeContext &TSC,

auto JTMB = JITTargetMachineBuilder(TI.getTriple());
JTMB.addFeatures(TI.getTargetOpts().Features);
LLJITBuilder Builder;
Builder.setJITTargetMachineBuilder(JTMB);
// Enable debugging of JIT'd code (only works on JITLink for ELF and MachO).
Builder.setEnableDebuggerSupport(true);

if (auto JitOrErr = Builder.create())
if (auto JitOrErr = LLJITBuilder().setJITTargetMachineBuilder(JTMB).create())
Jit = std::move(*JitOrErr);
else {
Err = JitOrErr.takeError();
Expand Down

0 comments on commit e64fbf2

Please sign in to comment.