mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-22 12:33:33 +02:00
359dea2a6b
Type specific declarations have been moved to Type.h and error handling routines have been moved to ErrorHandling.h. Both are included in Core.h so nothing should change for projects directly including the headers, but transitive dependencies may be affected. llvm-svn: 255965
32 lines
779 B
Go
32 lines
779 B
Go
//===- linker.go - Bindings for linker ------------------------------------===//
|
|
//
|
|
// The LLVM Compiler Infrastructure
|
|
//
|
|
// This file is distributed under the University of Illinois Open Source
|
|
// License. See LICENSE.TXT for details.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
//
|
|
// This file defines bindings for the linker component.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
package llvm
|
|
|
|
/*
|
|
#include "llvm-c/Core.h"
|
|
#include "llvm-c/Linker.h"
|
|
#include <stdlib.h>
|
|
*/
|
|
import "C"
|
|
import "errors"
|
|
|
|
func LinkModules(Dest, Src Module) error {
|
|
failed := C.LLVMLinkModules2(Dest.C, Src.C)
|
|
if failed != 0 {
|
|
err := errors.New("Linking failed")
|
|
return err
|
|
}
|
|
return nil
|
|
}
|