Path: blob/main/contrib/llvm-project/compiler-rt/lib/orc/macho_platform.h
39566 views
//===- macho_platform.h -----------------------------------------*- C++ -*-===//1//2// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3// See https://llvm.org/LICENSE.txt for license information.4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5//6//===----------------------------------------------------------------------===//7//8// ORC Runtime support for Darwin dynamic loading features.9//10//===----------------------------------------------------------------------===//1112#ifndef ORC_RT_MACHO_PLATFORM_H13#define ORC_RT_MACHO_PLATFORM_H1415#include "common.h"16#include "executor_address.h"1718// Atexit functions.19ORC_RT_INTERFACE int __orc_rt_macho_cxa_atexit(void (*func)(void *), void *arg,20void *dso_handle);21ORC_RT_INTERFACE void __orc_rt_macho_cxa_finalize(void *dso_handle);2223// dlfcn functions.24ORC_RT_INTERFACE const char *__orc_rt_macho_jit_dlerror();25ORC_RT_INTERFACE void *__orc_rt_macho_jit_dlopen(const char *path, int mode);26ORC_RT_INTERFACE int __orc_rt_macho_jit_dlclose(void *dso_handle);27ORC_RT_INTERFACE void *__orc_rt_macho_jit_dlsym(void *dso_handle,28const char *symbol);2930namespace __orc_rt {31namespace macho {3233enum dlopen_mode : int {34ORC_RT_RTLD_LAZY = 0x1,35ORC_RT_RTLD_NOW = 0x2,36ORC_RT_RTLD_LOCAL = 0x4,37ORC_RT_RTLD_GLOBAL = 0x838};3940} // end namespace macho41} // end namespace __orc_rt4243#endif // ORC_RT_MACHO_PLATFORM_H444546