| 1 | //===---- GetDylibInterface.h - Get interface for real dylib ----*- C++ -*-===// |
| 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 | // Get symbol interface from a real dynamic library or TAPI file. These |
| 10 | // interfaces can be used to simulate weak linking (ld64 -weak-lx / |
| 11 | // -weak_library) against a library that is absent at runtime. |
| 12 | // |
| 13 | //===----------------------------------------------------------------------===// |
| 14 | |
| 15 | #ifndef LLVM_EXECUTIONENGINE_ORC_GETDYLIBINTERFACE_H |
| 16 | #define LLVM_EXECUTIONENGINE_ORC_GETDYLIBINTERFACE_H |
| 17 | |
| 18 | #include "llvm/ExecutionEngine/Orc/Core.h" |
| 19 | #include "llvm/Support/Compiler.h" |
| 20 | |
| 21 | namespace llvm::orc { |
| 22 | |
| 23 | /// Returns a SymbolNameSet containing the exported symbols defined in the |
| 24 | /// given dylib. |
| 25 | LLVM_ABI Expected<SymbolNameSet> |
| 26 | getDylibInterfaceFromDylib(ExecutionSession &ES, Twine Path); |
| 27 | |
| 28 | /// Returns a SymbolNameSet containing the exported symbols defined in the |
| 29 | /// relevant slice of the TapiUniversal file. |
| 30 | LLVM_ABI Expected<SymbolNameSet> |
| 31 | getDylibInterfaceFromTapiFile(ExecutionSession &ES, Twine Path); |
| 32 | |
| 33 | /// Returns a SymbolNameSet containing the exported symbols defined in the |
| 34 | /// relevant slice of the given file, which may be either a dylib or a tapi |
| 35 | /// file. |
| 36 | LLVM_ABI Expected<SymbolNameSet> getDylibInterface(ExecutionSession &ES, |
| 37 | Twine Path); |
| 38 | |
| 39 | } // namespace llvm::orc |
| 40 | |
| 41 | #endif // LLVM_EXECUTIONENGINE_ORC_GETDYLIBINTERFACE_H |
| 42 | |