xref: /netbsd-src/external/apache2/llvm/dist/llvm/include/llvm-c/Linker.h (revision 82d56013d7b633d116a93943de88e08335357a7c)
17330f729Sjoerg /*===-- llvm-c/Linker.h - Module Linker C Interface -------------*- C++ -*-===*\
27330f729Sjoerg |*                                                                            *|
37330f729Sjoerg |* Part of the LLVM Project, under the Apache License v2.0 with LLVM          *|
47330f729Sjoerg |* Exceptions.                                                                *|
57330f729Sjoerg |* See https://llvm.org/LICENSE.txt for license information.                  *|
67330f729Sjoerg |* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception                    *|
77330f729Sjoerg |*                                                                            *|
87330f729Sjoerg |*===----------------------------------------------------------------------===*|
97330f729Sjoerg |*                                                                            *|
107330f729Sjoerg |* This file defines the C interface to the module/file/archive linker.       *|
117330f729Sjoerg |*                                                                            *|
127330f729Sjoerg \*===----------------------------------------------------------------------===*/
137330f729Sjoerg 
147330f729Sjoerg #ifndef LLVM_C_LINKER_H
157330f729Sjoerg #define LLVM_C_LINKER_H
167330f729Sjoerg 
17*82d56013Sjoerg #include "llvm-c/ExternC.h"
187330f729Sjoerg #include "llvm-c/Types.h"
197330f729Sjoerg 
20*82d56013Sjoerg LLVM_C_EXTERN_C_BEGIN
217330f729Sjoerg 
227330f729Sjoerg /* This enum is provided for backwards-compatibility only. It has no effect. */
237330f729Sjoerg typedef enum {
247330f729Sjoerg   LLVMLinkerDestroySource = 0, /* This is the default behavior. */
257330f729Sjoerg   LLVMLinkerPreserveSource_Removed = 1 /* This option has been deprecated and
267330f729Sjoerg                                           should not be used. */
277330f729Sjoerg } LLVMLinkerMode;
287330f729Sjoerg 
297330f729Sjoerg /* Links the source module into the destination module. The source module is
307330f729Sjoerg  * destroyed.
317330f729Sjoerg  * The return value is true if an error occurred, false otherwise.
327330f729Sjoerg  * Use the diagnostic handler to get any diagnostic message.
337330f729Sjoerg */
347330f729Sjoerg LLVMBool LLVMLinkModules2(LLVMModuleRef Dest, LLVMModuleRef Src);
357330f729Sjoerg 
36*82d56013Sjoerg LLVM_C_EXTERN_C_END
377330f729Sjoerg 
387330f729Sjoerg #endif
39