From: Peter Collingbourne Date: Thu, 5 Mar 2015 22:55:38 +0000 (+0000) Subject: Go bindings: use MDNode::replaceAllUsesWith instead of MDTuple::replaceAllUsesWith. X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=commitdiff_plain;h=bdfd937473302fa26615adc1a1d2c591077867a1 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 --- 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(MD); - assert(Node->isTemporary() && "Expected temporary node"); - Node->replaceAllUsesWith(unwrap(New)); + auto *Node = unwrap(MD); + Node->replaceAllUsesWith(unwrap(New)); MDNode::deleteTemporary(Node); }