Initial version of Go bindings.
[oota-llvm.git] / bindings / go / llvm / IRBindings.h
1 //===- IRBindings.h - Additional bindings for IR ----------------*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file defines additional C bindings for the IR component.
11 //
12 //===----------------------------------------------------------------------===//
13
14 #ifndef LLVM_BINDINGS_GO_LLVM_IRBINDINGS_H
15 #define LLVM_BINDINGS_GO_LLVM_IRBINDINGS_H
16
17 #include "llvm-c/Core.h"
18 #include <stdint.h>
19
20 #ifdef __cplusplus
21 extern "C" {
22 #endif
23
24 // These functions duplicate the LLVM*FunctionAttr functions in the stable C
25 // API. We cannot use the existing functions because they take 32-bit attribute
26 // values, and the Go bindings expose all of the LLVM attributes, some of which
27 // have values >= 1<<32.
28
29 void LLVMAddFunctionAttr2(LLVMValueRef Fn, uint64_t PA);
30 uint64_t LLVMGetFunctionAttr2(LLVMValueRef Fn);
31 void LLVMRemoveFunctionAttr2(LLVMValueRef Fn, uint64_t PA);
32
33 #ifdef __cplusplus
34 }
35 #endif
36
37 #endif