From 971805fcb0c4e4606b1898ca3e1281c398b5ec94 Mon Sep 17 00:00:00 2001 From: Vassil Vassilev Date: Fri, 3 May 2024 07:54:21 +0000 Subject: [PATCH] fix --- lib/Interpreter/Compatibility.h | 54 ++++++++++++++++----------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/lib/Interpreter/Compatibility.h b/lib/Interpreter/Compatibility.h index 259c45a70..5c6a1304e 100644 --- a/lib/Interpreter/Compatibility.h +++ b/lib/Interpreter/Compatibility.h @@ -21,34 +21,16 @@ #include "llvm/Support/Casting.h" #include "llvm/Support/Path.h" -/home/maximus/cppyy-interop-dev/CppInterOp/llvm-project/compiler-rt/lib/orc/macho_platform.cpp - -#ifdef USE_CLING - -#include "cling/Interpreter/DynamicLibraryManager.h" -#include "cling/Interpreter/Interpreter.h" -#include "cling/Interpreter/Transaction.h" -#include "cling/Interpreter/Value.h" - -#include "cling/Utils/AST.h" - -namespace Cpp { -namespace Cpp_utils = cling::utils; -} - -namespace compat { - -using Interpreter = cling::Interpreter; - #ifdef __APPLE__ -#include -#include +// #include +// #include +#include // Define a minimal mach header for JIT'd code. -static MachO::mach_header_64 fake_mach_header = { - .magic = MachO::MH_MAGIC_64, - .cputype = MachO::CPU_TYPE_ARM64, - .cpusubtype = MachO::CPU_SUBTYPE_ARM64_ALL, - .filetype = MachO::MH_DYLIB, +static llvm::MachO::mach_header_64 fake_mach_header = { + .magic = llvm::MachO::MH_MAGIC_64, + .cputype = llvm::MachO::CPU_TYPE_ARM64, + .cpusubtype = llvm::MachO::CPU_SUBTYPE_ARM64_ALL, + .filetype = llvm::MachO::MH_DYLIB, .ncmds = 0, .sizeofcmds = 0, .flags = 0, @@ -77,7 +59,25 @@ int find_dynamic_unwind_sections(uintptr_t addr, typedef int (*unw_find_dynamic_unwind_sections)( uintptr_t addr, struct unw_dynamic_unwind_sections* info); -#endif +#endif // #ifdef __APPLE__ + + +#ifdef USE_CLING + +#include "cling/Interpreter/DynamicLibraryManager.h" +#include "cling/Interpreter/Interpreter.h" +#include "cling/Interpreter/Transaction.h" +#include "cling/Interpreter/Value.h" + +#include "cling/Utils/AST.h" + +namespace Cpp { +namespace Cpp_utils = cling::utils; +} + +namespace compat { + +using Interpreter = cling::Interpreter; inline void maybeMangleDeclName(const clang::GlobalDecl& GD, std::string& mangledName) {