[llvm] r231416 - Go bindings: use MDNode::replaceAllUsesWith instead of MDTuple::replaceAllUsesWith.
Peter Collingbourne
peter at pcc.me.uk
Thu Mar 5 14:55:39 PST 2015
Author: pcc
Date: Thu Mar 5 16:55:38 2015
New Revision: 231416
URL: http://llvm.org/viewvc/llvm-project?rev=231416&view=rev
Log:
Go bindings: use MDNode::replaceAllUsesWith instead of MDTuple::replaceAllUsesWith.
Fixes llgo following Duncan's changes to debug info in r231082. llgo needs
to replace composite types, which are no longer represented using MDTuple.
Modified:
llvm/trunk/bindings/go/llvm/IRBindings.cpp
Modified: llvm/trunk/bindings/go/llvm/IRBindings.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/bindings/go/llvm/IRBindings.cpp?rev=231416&r1=231415&r2=231416&view=diff
==============================================================================
--- llvm/trunk/bindings/go/llvm/IRBindings.cpp (original)
+++ llvm/trunk/bindings/go/llvm/IRBindings.cpp Thu Mar 5 16:55:38 2015
@@ -86,9 +86,8 @@ void LLVMSetMetadata2(LLVMValueRef Inst,
}
void LLVMMetadataReplaceAllUsesWith(LLVMMetadataRef MD, LLVMMetadataRef New) {
- auto *Node = unwrap<MDTuple>(MD);
- assert(Node->isTemporary() && "Expected temporary node");
- Node->replaceAllUsesWith(unwrap<MDNode>(New));
+ auto *Node = unwrap<MDNode>(MD);
+ Node->replaceAllUsesWith(unwrap<Metadata>(New));
MDNode::deleteTemporary(Node);
}
More information about the llvm-commits
mailing list