1 //===- IRBindings.h - Additional bindings for IR ----------------*- C++ -*-===//
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
7 //===----------------------------------------------------------------------===//
9 // This file defines additional C bindings for the IR component.
11 //===----------------------------------------------------------------------===//
13 #ifndef LLVM_BINDINGS_GO_LLVM_IRBINDINGS_H
14 #define LLVM_BINDINGS_GO_LLVM_IRBINDINGS_H
16 #include "llvm-c/Core.h"
17 #include "llvm-c/DebugInfo.h"
19 #include "llvm/IR/Metadata.h"
20 #include "llvm/Support/CBindingWrapping.h"
29 struct LLVMDebugLocMetadata
{
32 LLVMMetadataRef Scope
;
33 LLVMMetadataRef InlinedAt
;
36 LLVMMetadataRef
LLVMConstantAsMetadata(LLVMValueRef Val
);
38 LLVMMetadataRef
LLVMMDString2(LLVMContextRef C
, const char *Str
, unsigned SLen
);
39 LLVMMetadataRef
LLVMMDNode2(LLVMContextRef C
, LLVMMetadataRef
*MDs
,
42 void LLVMAddNamedMetadataOperand2(LLVMModuleRef M
, const char *name
,
44 void LLVMSetMetadata2(LLVMValueRef Inst
, unsigned KindID
, LLVMMetadataRef MD
);
46 void LLVMGoSetCurrentDebugLocation(LLVMBuilderRef Bref
, unsigned Line
,
47 unsigned Col
, LLVMMetadataRef Scope
,
48 LLVMMetadataRef InlinedAt
);
50 struct LLVMDebugLocMetadata
LLVMGoGetCurrentDebugLocation(LLVMBuilderRef Bref
);