1 //===- linker.go - Bindings for linker ------------------------------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file defines bindings for the linker component.
12 //===----------------------------------------------------------------------===//
17 #include "llvm-c/Linker.h"
23 func LinkModules(Dest, Src Module) error {
25 failed := C.LLVMLinkModules(Dest.C, Src.C, C.LLVMLinkerDestroySource, &cmsg)
27 err := errors.New(C.GoString(cmsg))
28 C.LLVMDisposeMessage(cmsg)