From bdfd937473302fa26615adc1a1d2c591077867a1 Mon Sep 17 00:00:00 2001 From: Peter Collingbourne Date: Thu, 5 Mar 2015 22:55:38 +0000 Subject: [PATCH] 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 --- bindings/go/llvm/IRBindings.cpp | 5 ++--- 1 file 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(MD); - assert(Node->isTemporary() && "Expected temporary node"); - Node->replaceAllUsesWith(unwrap(New)); + auto *Node = unwrap(MD); + Node->replaceAllUsesWith(unwrap(New)); MDNode::deleteTemporary(Node); } -- 2.34.1