llvm.org GIT mirror llvm / 3a40431
Go bindings: introduce llvm.TemporaryMDNode. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224178 91177308-0d34-0410-b5e6-96231b3b80d8 Peter Collingbourne 5 years ago
3 changed file(s) with 13 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
5959 MDNode::get(*unwrap(C), ArrayRef(unwrap(MDs), Count)));
6060 }
6161
62 LLVMMetadataRef LLVMTemporaryMDNode(LLVMContextRef C, LLVMMetadataRef *MDs,
63 unsigned Count) {
64 return wrap(MDNode::getTemporary(*unwrap(C),
65 ArrayRef(unwrap(MDs), Count)));
66 }
67
6268 void LLVMAddNamedMetadataOperand2(LLVMModuleRef M, const char *name,
6369 LLVMMetadataRef Val) {
6470 NamedMDNode *N = unwrap(M)->getOrInsertNamedMetadata(name);
3939 LLVMMetadataRef LLVMMDString2(LLVMContextRef C, const char *Str, unsigned SLen);
4040 LLVMMetadataRef LLVMMDNode2(LLVMContextRef C, LLVMMetadataRef *MDs,
4141 unsigned Count);
42 LLVMMetadataRef LLVMTemporaryMDNode(LLVMContextRef C, LLVMMetadataRef *MDs,
43 unsigned Count);
4244
4345 void LLVMAddNamedMetadataOperand2(LLVMModuleRef M, const char *name,
4446 LLVMMetadataRef Val);
748748 md.C = C.LLVMMDNode2(c.C, ptr, nvals)
749749 return
750750 }
751 func (c Context) TemporaryMDNode(mds []Metadata) (md Metadata) {
752 ptr, nvals := llvmMetadataRefs(mds)
753 md.C = C.LLVMTemporaryMDNode(c.C, ptr, nvals)
754 return
755 }
751756
752757 // Operations on scalar constants
753758 func ConstInt(t Type, n uint64, signExtend bool) (v Value) {