We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 267774d commit 87f2b0dCopy full SHA for 87f2b0d
src/core/metadata.jl
@@ -38,3 +38,15 @@ function operands(md::MDNode)
38
API.LLVMGetMDNodeOperands(ref(md), ops)
39
return Value[Value(op) for op in ops]
40
end
41
+
42
+@checked struct Metadata
43
+ ref::API.LLVMMetadataRef
44
+end
45
+reftype(::Type{Metadata}) = API.LLVMMetdataRef
46
+function Value(md::Metadata, ctx::Context)
47
+ return MetadataAsValue(API.LLVMMetadataAsValue(ref(ctx), md))
48
49
50
+function Metadata(val::Value)
51
+ return Metadata(LLVM.API.LLVMValueAsMetadata(ref(val)))
52
0 commit comments