llvm.org GIT mirror llvm / e9e0f37
Go bindings: introduce Metadata.ReplaceAllUsesWith. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224177 91177308-0d34-0410-b5e6-96231b3b80d8 Peter Collingbourne 5 years ago
3 changed file(s) with 16 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
7474 unwrap(Inst)->setMetadata(KindID, N);
7575 }
7676
77 void LLVMMetadataReplaceAllUsesWith(LLVMMetadataRef MD, LLVMMetadataRef New) {
78 auto *Node = unwrap(MD);
79 Node->replaceAllUsesWith(unwrap(New));
80 MDNode::deleteTemporary(Node);
81 }
82
7783 void LLVMSetCurrentDebugLocation2(LLVMBuilderRef Bref, unsigned Line,
7884 unsigned Col, LLVMMetadataRef Scope,
7985 LLVMMetadataRef InlinedAt) {
4444 LLVMMetadataRef Val);
4545 void LLVMSetMetadata2(LLVMValueRef Inst, unsigned KindID, LLVMMetadataRef MD);
4646
47 void LLVMMetadataReplaceAllUsesWith(LLVMMetadataRef MD, LLVMMetadataRef New);
48
4749 void LLVMSetCurrentDebugLocation2(LLVMBuilderRef Bref, unsigned Line,
4850 unsigned Col, LLVMMetadataRef Scope,
4951 LLVMMetadataRef InlinedAt);
18261826 // the module provider.
18271827 // See llvm::PassManagerBase::~PassManagerBase.
18281828 func (pm PassManager) Dispose() { C.LLVMDisposePassManager(pm.C) }
1829
1830 //-------------------------------------------------------------------------
1831 // llvm.Metadata
1832 //-------------------------------------------------------------------------
1833
1834 func (md Metadata) ReplaceAllUsesWith(new Metadata) {
1835 C.LLVMMetadataReplaceAllUsesWith(md.C, new.C)
1836 }