summaryrefslogtreecommitdiff
path: root/bindings
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2015-03-05 22:55:38 +0000
committerPeter Collingbourne <peter@pcc.me.uk>2015-03-05 22:55:38 +0000
commitbdfd937473302fa26615adc1a1d2c591077867a1 (patch)
tree652d2399199ba504a07e6bbdfc15f3b829ca1d92 /bindings
parent292f5ef237bb463ebee837d4122d4e93b1e3f794 (diff)
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231416 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'bindings')
-rw-r--r--bindings/go/llvm/IRBindings.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/bindings/go/llvm/IRBindings.cpp b/bindings/go/llvm/IRBindings.cpp
index fb451efec52..fd0cb8006a4 100644
--- a/bindings/go/llvm/IRBindings.cpp
+++ b/bindings/go/llvm/IRBindings.cpp
@@ -86,9 +86,8 @@ void LLVMSetMetadata2(LLVMValueRef Inst, unsigned KindID, LLVMMetadataRef MD) {
}
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);
}