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); }