From: Vassil Vassilev Date: Tue, 18 Apr 2023 13:40:52 +0000 (+0000) Subject: Revert "[clang-repl] Enable debugging of JIT-ed code." X-Git-Tag: upstream/17.0.6~11185 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e64fbf2cca8c4763a058ba59a48ab8e4b8193028;p=platform%2Fupstream%2Fllvm.git Revert "[clang-repl] Enable debugging of JIT-ed code." This reverts commit 1e4891e681c51f3e2a724b4ac4e42380ec4a9be1. Some bots complain about undefined llvm_orc_registerJITLoaderGDBAllocAction. --- diff --git a/clang/lib/Interpreter/IncrementalExecutor.cpp b/clang/lib/Interpreter/IncrementalExecutor.cpp index 3f8d606..fdf12dd 100644 --- a/clang/lib/Interpreter/IncrementalExecutor.cpp +++ b/clang/lib/Interpreter/IncrementalExecutor.cpp @@ -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, @@ -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();