[MIParser] Set RegClassOrRegBank during instruction parsing
[llvm-complete.git] / bindings / go / llvm / linker.go
blob8e2e953fd46515960a7706f4f126cbc2bf95781d
1 //===- linker.go - Bindings for linker ------------------------------------===//
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 defines bindings for the linker component.
11 //===----------------------------------------------------------------------===//
13 package llvm
16 #include "llvm-c/Core.h"
17 #include "llvm-c/Linker.h"
18 #include <stdlib.h>
20 import "C"
21 import "errors"
23 func LinkModules(Dest, Src Module) error {
24 failed := C.LLVMLinkModules2(Dest.C, Src.C)
25 if failed != 0 {
26 err := errors.New("Linking failed")
27 return err
29 return nil