From c739e3bd4c755d796e5667004dda458fa3555096 Mon Sep 17 00:00:00 2001 From: Roland Conybeare Date: Mon, 17 Jun 2024 17:14:44 -0400 Subject: [PATCH] xo-jit: + MachPipeline::dump_current_module --- include/xo/jit/MachPipeline.hpp | 3 +++ src/jit/MachPipeline.cpp | 8 ++++++++ 2 files changed, 11 insertions(+) diff --git a/include/xo/jit/MachPipeline.hpp b/include/xo/jit/MachPipeline.hpp index ca59dfb3..84b01a9d 100644 --- a/include/xo/jit/MachPipeline.hpp +++ b/include/xo/jit/MachPipeline.hpp @@ -92,6 +92,9 @@ namespace xo { **/ void machgen_current_module(); + /** dump text description of module contents to console **/ + void dump_current_module(); + /** lookup symbol in jit-associated output library **/ llvm::orc::ExecutorAddr lookup_symbol(const std::string & x); diff --git a/src/jit/MachPipeline.cpp b/src/jit/MachPipeline.cpp index 969cfd04..3192e531 100644 --- a/src/jit/MachPipeline.cpp +++ b/src/jit/MachPipeline.cpp @@ -503,6 +503,14 @@ namespace xo { return nullptr; } /*codegen*/ + void + MachPipeline::dump_current_module() + { + /* dump module contents to console */ + + llvm_module_->dump(); + } + void MachPipeline::machgen_current_module() {