[clang] Handle __declspec() attributes in using
[llvm-project.git] / compiler-rt / lib / orc / coff_platform.per_jd.cpp
blob6c208cb318580c75d01f4683e004e8f700eb882b
1 //===- coff_platform.per_jd.cpp -------------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file contains code that will be loaded per each JITDylib.
11 //===----------------------------------------------------------------------===//
12 #include "compiler.h"
14 ORC_RT_INTERFACE void __orc_rt_coff_per_jd_marker() {}
16 typedef int (*OnExitFunction)(void);
17 typedef void (*AtExitFunction)(void);
19 extern "C" void *__ImageBase;
20 ORC_RT_INTERFACE OnExitFunction __orc_rt_coff_onexit(void *Header,
21 OnExitFunction Func);
22 ORC_RT_INTERFACE int __orc_rt_coff_atexit(void *Header, AtExitFunction Func);
24 ORC_RT_INTERFACE OnExitFunction
25 __orc_rt_coff_onexit_per_jd(OnExitFunction Func) {
26 return __orc_rt_coff_onexit(&__ImageBase, Func);
29 ORC_RT_INTERFACE int __orc_rt_coff_atexit_per_jd(AtExitFunction Func) {
30 return __orc_rt_coff_atexit(&__ImageBase, Func);