LLVM API Documentation

c/Linker.h
Go to the documentation of this file.
00001 /*===-- llvm-c/Linker.h - Module Linker C Interface -------------*- C++ -*-===*\
00002 |*                                                                            *|
00003 |*                     The LLVM Compiler Infrastructure                       *|
00004 |*                                                                            *|
00005 |* This file is distributed under the University of Illinois Open Source      *|
00006 |* License. See LICENSE.TXT for details.                                      *|
00007 |*                                                                            *|
00008 |*===----------------------------------------------------------------------===*|
00009 |*                                                                            *|
00010 |* This file defines the C interface to the module/file/archive linker.       *|
00011 |*                                                                            *|
00012 \*===----------------------------------------------------------------------===*/
00013 
00014 #ifndef LLVM_C_LINKER_H
00015 #define LLVM_C_LINKER_H
00016 
00017 #include "llvm-c/Core.h"
00018 
00019 #ifdef __cplusplus
00020 extern "C" {
00021 #endif
00022 
00023 
00024 typedef enum {
00025   LLVMLinkerDestroySource = 0, /* Allow source module to be destroyed. */
00026   LLVMLinkerPreserveSource = 1 /* Preserve the source module. */
00027 } LLVMLinkerMode;
00028 
00029 
00030 /* Links the source module into the destination module, taking ownership
00031  * of the source module away from the caller. Optionally returns a
00032  * human-readable description of any errors that occurred in linking.
00033  * OutMessage must be disposed with LLVMDisposeMessage. The return value
00034  * is true if an error occurred, false otherwise. */
00035 LLVMBool LLVMLinkModules(LLVMModuleRef Dest, LLVMModuleRef Src,
00036                          LLVMLinkerMode Mode, char **OutMessage);
00037 
00038 #ifdef __cplusplus
00039 }
00040 #endif
00041 
00042 #endif