Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
vgvassilev committed May 3, 2024
1 parent 06c22ba commit 971805f
Showing 1 changed file with 27 additions and 27 deletions.
54 changes: 27 additions & 27 deletions lib/Interpreter/Compatibility.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 <mach-o/dyld.h>
#include <sys/stat.h>
// #include <mach-o/dyld.h>
// #include <sys/stat.h>
#include <dlfcn.h>
// 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,
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 971805f

Please sign in to comment.