llvm.org GIT mirror llvm / e881eef
Go bindings: introduce Value.ConstantAsMetadata. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224179 91177308-0d34-0410-b5e6-96231b3b80d8 Peter Collingbourne 4 years ago
3 changed file(s) with 10 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
4949 Func->setAttributes(PALnew);
5050 }
5151
52 LLVMMetadataRef LLVMConstantAsMetadata(LLVMValueRef C) {
53 return wrap(ConstantAsMetadata::get(unwrap(C)));
54 }
55
5256 LLVMMetadataRef LLVMMDString2(LLVMContextRef C, const char *Str, unsigned SLen) {
5357 return wrap(MDString::get(*unwrap(C), StringRef(Str, SLen)));
5458 }
3636 uint64_t LLVMGetFunctionAttr2(LLVMValueRef Fn);
3737 void LLVMRemoveFunctionAttr2(LLVMValueRef Fn, uint64_t PA);
3838
39 LLVMMetadataRef LLVMConstantAsMetadata(LLVMValueRef Val);
40
3941 LLVMMetadataRef LLVMMDString2(LLVMContextRef C, const char *Str, unsigned SLen);
4042 LLVMMetadataRef LLVMMDNode2(LLVMContextRef C, LLVMMetadataRef *MDs,
4143 unsigned Count);
753753 md.C = C.LLVMTemporaryMDNode(c.C, ptr, nvals)
754754 return
755755 }
756 func (v Value) ConstantAsMetadata() (md Metadata) {
757 md.C = C.LLVMConstantAsMetadata(v.C)
758 return
759 }
756760
757761 // Operations on scalar constants
758762 func ConstInt(t Type, n uint64, signExtend bool) (v Value) {