MDNode::get(*unwrap(C), ArrayRef<Metadata *>(unwrap(MDs), Count)));
}
+LLVMMetadataRef LLVMTemporaryMDNode(LLVMContextRef C, LLVMMetadataRef *MDs,
+ unsigned Count) {
+ return wrap(MDNode::getTemporary(*unwrap(C),
+ ArrayRef<Metadata *>(unwrap(MDs), Count)));
+}
+
void LLVMAddNamedMetadataOperand2(LLVMModuleRef M, const char *name,
LLVMMetadataRef Val) {
NamedMDNode *N = unwrap(M)->getOrInsertNamedMetadata(name);
unwrap<Instruction>(Inst)->setMetadata(KindID, N);
}
+void LLVMMetadataReplaceAllUsesWith(LLVMMetadataRef MD, LLVMMetadataRef New) {
+ auto *Node = unwrap<MDNodeFwdDecl>(MD);
+ Node->replaceAllUsesWith(unwrap<MDNode>(New));
+ MDNode::deleteTemporary(Node);
+}
+
void LLVMSetCurrentDebugLocation2(LLVMBuilderRef Bref, unsigned Line,
unsigned Col, LLVMMetadataRef Scope,
LLVMMetadataRef InlinedAt) {